SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2014 v19 beta => Topic started by: rajkej on August 21, 2014, 04:53:00 PM

Title: Cursor moved upon saving file
Post by: rajkej on August 21, 2014, 04:53:00 PM
If my cursor is at the end of a source code line and I save the file using the default save command, my cursor is moved to the right one character.

Not really a big deal but seems odd.
Title: Re: Cursor moved upon saving file
Post by: Dennis on August 21, 2014, 11:49:17 PM
What are your save options ?

Tools > Options... > File Options... > Save...
Title: Re: Cursor moved upon saving file
Post by: rajkej on August 22, 2014, 01:32:50 PM
append eof: off
remove eof: on
expand tabs: expand all tabs to spaces
strip trailing spaces: strip all trailing spaces
save files on loss: off
reset modified: off
add file to project upon save as: off

And I can open a file, move cursor to last character of line, save file and the cursor moves. Move cursor to end of line, save file and cursor moves.
Title: Re: Cursor moved upon saving file
Post by: Mike on August 22, 2014, 01:57:00 PM
Does the cursor move if you turn off "expand tabs to spaces"?
Title: Re: Cursor moved upon saving file
Post by: rajkej on August 22, 2014, 02:03:53 PM
I just tried individual combinations of the remove eof, expand tabs, and strip trailing spaces and the cursor moved each time. I tried saving both .py and .h files with the same result on each.
Title: Re: Cursor moved upon saving file
Post by: Mike on August 22, 2014, 04:03:39 PM
Does the column actually change (see bottom right, on status bar), or is there just a visible movement of the cursor?
Title: Re: Cursor moved upon saving file
Post by: rajkej on August 22, 2014, 04:41:17 PM
Does the column actually change (see bottom right, on status bar), or is there just a visible movement of the cursor?

Yes. The column changes and the box showing the hex value updates from 0A to blank.
I changed the Tools/Options/Editing/CursorMovement/Cursor right-left wraps to next-prev line from my normal setting of 'off' to 'on' and the cursor still moved to the right (not the next line). But if I move the cursor myself, it moves to the next line. However, if I click to that same spot, the cursor goes to where I click. My settings for cursor up/down virtual space is on and click past end of line is on. I changed both of those to off and the cursor still moved.
Title: Re: Cursor moved upon saving file
Post by: Dan on August 22, 2014, 04:48:51 PM
What happens if you type "save" on the SlickEdit command line?
Title: Re: Cursor moved upon saving file
Post by: rajkej on August 22, 2014, 05:19:15 PM
What happens if you type "save" on the SlickEdit command line?

Same thing as when I use my normal save button. The cursor moves one spot to the right.
Title: Re: Cursor moved upon saving file
Post by: Clark on August 27, 2014, 01:53:08 PM
Reproduced. This should be easy to fix. Thanks

You are using the +FU option in your save options. V19 has new code for multiple cursor/selection support which adjusts cursors on edits. That's why you're seeing this problem. The save code is modifying the new-lines which moves cursors.