Author Topic: B5: Multiple cursors and virtual cursor columns  (Read 1463 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1960
  • Hero Points: 185
  • Text
B5: Multiple cursors and virtual cursor columns
« on: September 25, 2014, 10:35:13 pm »
Starting with this text:


Code: [Select]
<blank line here>
ALLUSERSPROFILE
APPDATA
CommonProgramFiles
CommonProgramFiles(x86)
CommonProgramW6432
COMPUTERNAME
Use shift-RMB-Drag to block select (the 6 non-blank lines), and set multiple cursors.
Initial position of the cursors

Code: [Select]
<blank line here>
ALLUSERSPROFILE|
APPDATA|
CommonProgramFiles|
CommonProgramFiles(x86)|
CommonProgramW6432|
COMPUTERNAME|

After up/down cursor once.
Code: [Select]
<blank line here>
ALLUSERSPROF|ILE
APPDATA|
CommonProgra|mFiles
CommonProgra|mFiles(x86)
CommonProgra|mW6432
COMPUTERNAME|



This is inconsistent.
Best case: All the cursors would return to the end of each line.
Normally Slick remembers the column the cursor is in, so if you cursor up and down the cursor doesn't end up walking left as you hit short lines. (So, if the cursor is on col 40, I cursor up to an empty line, then cursor down again, the cursor returns to column 40).
This is what I would expect multiple cursors to do.


OTOH, even if each cursor doesn't remember its "ideal" column like a single cursor does, then the following is what should have happened:


After UP (actual behavior)
Code: [Select]
|
ALLUSER|SPROFILE
APPDATA|
CommonProgramFiles|
CommonProgramFiles|(x86)
CommonProgra|mW6432
COMPUTERNAME



After DOWN (What it should have done if it doesn't remember column positions).
Code: [Select]
<blank line here>
|ALLUSERSPROFILE
APPDATA|
CommonP|rogramFiles
CommonProgramFiles|(x86)
CommonProgramW6432|
COMPUTERNAME|





So, what is it really doing?
It seems unpredictable.


Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 5269
  • Hero Points: 432
Re: B5: Multiple cursors and virtual cursor columns
« Reply #1 on: September 26, 2014, 01:22:24 am »
Thanks for reporting this. The cursor-up and cursor-down commands are using a few globals for all cursors instead of one for each cursor.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 5269
  • Hero Points: 432
Re: B5: Multiple cursors and virtual cursor columns
« Reply #2 on: September 26, 2014, 01:44:14 am »
Fixed for next beta.