Author Topic: A question about newline  (Read 179 times)

Ciky_Yin

  • Community Member
  • Posts: 14
  • Hero Points: 0
A question about newline
« on: February 22, 2023, 02:50:37 am »
Code: [Select]
#define GPA_EMU (DWORD)&HT_EMUECA->All_GPa //A
#define GPB_EMU (DWORD)&HT_EMUECA->All_GPb //B
When I insert a line between the above two lines of code, the editor will automatically insert a line of code comments. But I want to insert a line of code by default. Please tell me how to solve this problem,In addition to pressing the ctrl+enter button, thank you!
Code: [Select]
#define GPA_EMU (DWORD)&HT_EMUECA->All_GPa //A
//
#define GPB_EMU (DWORD)&HT_EMUECA->All_GPb //B

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3816
  • Hero Points: 500
Re: A question about newline
« Reply #1 on: February 22, 2023, 01:43:12 pm »
Go to:  Document > C/C++ Options... > Comments

Then turn off ( ) Split line comments

Also, just to note for our viewers, the appearance of incorrect indentation for the new comment is because of the indent with tabs in the browser.  SlickEdit actually indents the comment correctly when you see it in your editor.

I am going to file a feature request for a future release to make "Split line comments" and "Extend line comments" work more strictly, because I can see that some people would not want the feature for comments that are not at the beginning of the line.

I will add a hot fix for 27.0.1 to add an undo step so that when you split or extend a comment, if it isn't what you want, you can undo and just get the new line.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3816
  • Hero Points: 500
Re: A question about newline
« Reply #2 on: February 22, 2023, 02:14:14 pm »
The hot fix will fix what I mentioned, but also will fix "Split line comment" to not split the line comment if your cursor is at the end of the line (it will only do it if "Extend line comments" is also enabled in this case.

Thanks for reporting this issue!