Author Topic: surround with #if/#if...else/#ifdef/#ifndef, cursor position  (Read 1311 times)

ahkevin

  • Community Member
  • Posts: 35
  • Hero Points: 0
surround with #if/#if...else/#ifdef/#ifndef, cursor position
« on: August 27, 2021, 10:22:56 am »
I noticed that surround line(s) with #if/#if...else/#ifdef/#ifndef in a big C code project, the cursor will place at next line after #if. But I can't reproduce on another little project.


SlickEdit Pro 2020 (v25.0.2.0 64-bit)

Serial number: *
Licensed number of users: Single user
License file: C:\ProgramData\slickedit\25\slickedit.lic

Build Date: June 30, 2021
Emulation: Vim

OS: Windows 10 x64
OS Version: 10.00.0 
Memory: 70% Load, 11456MB/16252MB Physical, 16248MB/32636MB Page File, 5877MB/134217727MB Virtual
Shell Information: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080 (1920 0 1920 1080), 1920 x 1080 (0 0 1920 1080)

Project Type: Vcpp
Language: .c (C/C++)
Encoding: UTF-8, no signature

Installation Directory: d:\SlickEdit\SlickEdit Pro 25.0.2\ (non-removable drive,NTFS,118486MB free)
Configuration Directory: C:\Users\Administrator\Documents\My SlickEdit Config\25.0.2\ (non-removable drive,NTFS,122268MB free)
Spill File: C:\Users\Administrator\AppData\Local\Temp\$slk.7956 (non-removable drive,NTFS,122268MB free)


patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1651
  • Hero Points: 140
Re: surround with #if/#if...else/#ifdef/#ifndef, cursor position
« Reply #1 on: August 27, 2021, 12:02:23 pm »
I found a file I can reproduce that with.  Looks like if you have "beautify alias expansions" enabled under the Editing section of the language options, it can sometimes misplace the cursor, depending on the code preceding the expansion.  I'll take a look at it, thanks for the report.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1651
  • Hero Points: 140
Re: surround with #if/#if...else/#ifdef/#ifndef, cursor position
« Reply #2 on: August 30, 2021, 05:57:53 pm »
Fixed,   but the problem was not hot-fixable, so it won't appear until Beta 3 of v26.  The only workaround is to turn off "beautify alias expansions" under the Editing section of the language options.

ahkevin

  • Community Member
  • Posts: 35
  • Hero Points: 0
Re: surround with #if/#if...else/#ifdef/#ifndef, cursor position
« Reply #3 on: September 01, 2021, 02:31:03 am »
well done, thanks