Author Topic: Cursor moved upon saving file  (Read 5078 times)

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Cursor moved upon saving file
« 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.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: Cursor moved upon saving file
« Reply #1 on: August 21, 2014, 11:49:17 PM »
What are your save options ?

Tools > Options... > File Options... > Save...

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Cursor moved upon saving file
« Reply #2 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.

Mike

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 100
  • Hero Points: 21
Re: Cursor moved upon saving file
« Reply #3 on: August 22, 2014, 01:57:00 PM »
Does the cursor move if you turn off "expand tabs to spaces"?

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Cursor moved upon saving file
« Reply #4 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.

Mike

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 100
  • Hero Points: 21
Re: Cursor moved upon saving file
« Reply #5 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?

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Cursor moved upon saving file
« Reply #6 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.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Cursor moved upon saving file
« Reply #7 on: August 22, 2014, 04:48:51 PM »
What happens if you type "save" on the SlickEdit command line?

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Cursor moved upon saving file
« Reply #8 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.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: Cursor moved upon saving file
« Reply #9 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.