Sublime Forum

Copy/paste problem and find/replace newline

#1

Recently I upgraded to ST3 from ST2. Build 3143, licensed. Using the Emacs Pro Essentials package, with just a few keymapping mods of my own.

Two things are driving me nuts on ST3, and I wonder if they’re bugs, or I just don’t understand something.

  1. When I select/highlight some text and use the “copy” command, the highlighting of the selection disappears and the cursor is placed at the end of where the selection was. This occurs whether I use the context menu “copy” or the keyboard. The text is no longer selected.

  2. The Find panel can no longer accept the RETURN key. I used to be able to bring up a find/replace panel and type a RETURN into one of the fields. That no longer works. And even ^Q (quote in Emacs) doesn’t work to quote a newline. I can fiddle around and copy a linefeed from the buffer, but why can’t I type one in anymore? LOL, I used that functionality all the time to copy/replace multi-line snippets.

Thanks for any help/pointers.

0 Likes

#2
  1. I suspect its a plugin doing that. Depending how, debugging may be trivial or not. If you type sublime.log_commands(True) Enter in the ST console (View menu -> Show Console) and then right click and copy (or use the keyboard shortcut), what command appears in the console?
  2. On Windows / Linux, one can press Ctrl+Enter to get a newline in the find panel - not sure if it works on a Mac or if Emacs Pro Essentials would hinder that
1 Like

#3

Ctrl+Enter also inserts a newline into the find panels as it does on the other platforms, so I would agree that if that’s not working for you it may be because of Emacs Pro Essentials or some other plugin that’s doing something funny.

1 Like

#4

OK, I had some text in a buffer. Turned on the console and the log command. Then double-clicked a word and hit copy in the context menu. I got this:

command: drag_select {“event”: {“button”: 1, “x”: 111.5, “y”: 44.5}}
command: drag_select {“by”: “words”, “event”: {“button”: 1, “x”: 111.5, “y”: 44.5}}
command: context_menu {“event”: {“button”: 2, “x”: 111.5, “y”: 44.5}}
command: copy {“event”: {“x”: 111.5, “y”: 44.5}}

Tried same with dragging across a word and using Ctrl+C (actually alt-C in my config) to copy:
command: drag_select {“event”: {“button”: 1, “x”: 101.5, “y”: 42.5}}
command: copy

Seems totally sane and expected…

And btw, Ctrl+ENTER works to insert a newline in the find panel. Hmm. ST2 didn’t require that; just ENTER worked. But now I know! Thanks!!

1 Like

#5

Just fwiw… To follow up, I verified that if I remove my personal keymappings, this bug still occurs. Only the Emacs Pro Essentials package is installed.

If I then remove the Emacs package, the bug goes away. So it seems fairly clear that the Emacs Pro Essentials package is causing the selection problem.

To re-iterate: select some text. HIt “copy”. The text gets un-selected (un-highlighted) and the cursor jumps to the end of the formerly selected area. Build 3143, and whatever current version of the Emacs package is installed from package control.

0 Likes

#6

you should file an issue on that package’s issue tracker then, if there isn’t one already

0 Likes

#7

Thanks kingkeith… Ah… Looking at issues for the package over on Github. Looks like this may be a known bug. And a long-standing one. Aaargh. :slight_smile:

0 Likes