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

rajkej

  • Senior Community Member
  • Posts: 281
  • Hero Points: 12
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

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2713
  • Hero Points: 413
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: 281
  • Hero Points: 12
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: 20
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: 281
  • Hero Points: 12
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: 20
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: 281
  • Hero Points: 12
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: 2343
  • Hero Points: 129
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: 281
  • Hero Points: 12
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: 4743
  • Hero Points: 383
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.