unixwork / xnedit

A fast and classic X11 text editor, based on NEdit, with full unicode support and antialiased text rendering.
Other
82 stars 12 forks source link

Possible bug, perhaps related to split pane #116

Closed cblc closed 1 year ago

cblc commented 1 year ago

This has happened to me twice, but I don't know how to reproduce it. Anyway, I believe that in both occasions I had used the "split pane" feature on the affected file, some time before the issue happened (in the same session). Anyway, when the issue happened, I was in single window mode again (ie: no split pane at that moment).

The problem is that suddenly (I think that it happens after applying copy/paste) I get two cursors at the same time. It's kinda cool 🤣 because whatever I type, it appears in two places of the document at the same time. It's like if you were playing a videogame in "2 player mode" 🤣

Anybody else saw this too? (I'm on MacOS)

cblc commented 1 year ago

Ah, I forgot: when it happens, it's fixed by enabling "split pane", and disabling it again. Then XNEdit realizes there's only one joystick plugged 🤣 and disables one of the cursors.

unixwork commented 1 year ago

It is not a bug, it is the new multicursor feature (Help -> Basic Operation -> Multi-cursor Editing)

You can add additional cursors with ctrl+left click. To return to single cursor mode, press escape or just do a normal left click to any text position.

cblc commented 1 year ago

Oh la la 😄 I need to buy another joystick then 😄 It's a cool feature, BTW.

cblc commented 1 year ago

By the way, I feel like the current mouse/keys combination for multicursor is prone to getting undesired multiple text pasting if you are clicking with the mouse and pressing Ctrl+V very quickly. Quite often, the left click I perform with the mouse for specifying where to paste the text, becomes combined with the Ctrl+V key press, and XNEdit starts a multicursor there.

cblc commented 1 year ago

FWIW, I keep hitting this... quick mouse clicks with Ctrl+V made me break a code line yesterday, and another today (because of inadvertently starting multicursor mode).

unixwork commented 1 year ago

I've implemented a workaround for that. If you accidentally press Ctrl+Button1+V, it adds only the text to new position.

You could also compile xnedit without the multicursor feature now if you add -DDISABLE_MULTICURSOR to CFLAGS.