atg / chocolat-public

Public bug tracker for the private chocolat project
http://chocolatapp.com
180 stars 4 forks source link

Shift+Cmd+Left selection bug #1137

Open mjbaldwin opened 12 years ago

mjbaldwin commented 12 years ago

To demonstrate this behavior, I'll contrast how Shift+Cmd+Right works correctly, and Shift+Cmd+Left doesn't:

Correct version (with Shift+Cmd+Right):

  1. Type abcdef
  2. Place cursor between c and d
  3. Press Cmd+Shift+Right Arrow. The letters def are selected
  4. Press Shift+Left. Now, only the letters de are selected.

This is correct, because the "invisible" cursor went to the end of the line, and the left arrow moved it left once.

However, this breaks when using Shift+Cmd+Left:

  1. Type abcdef
  2. Place cursor between c and d
  3. Press Cmd+Shift+Left Arrow. The letters abc are selected
  4. Press Shift+Right.

Expected behavior: the letters bc are selected.

Actual behavior: the letters abcd are selected.

For some reason, Shift+Cmd+Left extends the selection appropriately, but forgets to move the "invisible" cursor along with it.

I actually run into this bug all the time during editing, since I tend to use Shift+Cmd+Left a lot to select up to the beginning of the line.

Chocolat 1.2

atg commented 11 years ago

This is really weird. Just tried it in TextEdit and it is indeed different to Chocolat's behaviour. Not sure why though. Must check if we're overriding either of cmd-shift-arrow or shift-arrow.

atg commented 11 years ago

So this is due to setting new selections.