bad mc-edit paste behavior?

Paul Sokolovsky pmiscml at gmail.com
Mon Sep 16 18:37:17 UTC 2013


Hello,

On Mon, 16 Sep 2013 20:03:51 +0200
Egmont Koblinger <egmont at gmail.com> wrote:

> On Sun, Sep 15, 2013 at 7:07 PM, Paul Sokolovsky <pmiscml at gmail.com>
> wrote:
> 
> > Hello,
> >
> > So, long ago I indeed worked that around by going to setting and
> > turning autoindent off then on (boring!). Then however I noticed
> > that depending on the way you paste you may be able to work it
> > around by several paste attempts. For example, Gnome terminal has 3
> > ways to paste: menu command, Ctrl+Shift+V, Shift+Ins. So far, my
> > background pattern matcher didn't find exact rule what works
> > better, it seems to be just non-deterministic, though intuitively,
> > Shift+Ins appear to work better.
> >
> 
> So... part of the story is that there's a Primary selection and
> there's a Clipboard, and some hotkeys might paste one and some the
> other.  But I'm sure you've already figured it out.

Yup, after 6 years of using Linux-based systems as primary workstations,
I finally did, and dread all those dirty guts of X, and can't help but
share a sentiment that if we outlived Windows, we should outlive these
awful technologies of early 1980ies either. Can't wait for X to be
dead.

> The second problem is that MC looks at the modifiers (assuming X11
> support is available) and certain keys have different meaning
> depending on them. E.g. Shift+Enter does a non-indenting newline,
> that's why Shift+Insert doesn't mess up indentation, so it usually
> gives a better result than the menu command of the terminal.  But
> Ctrl+Shift+Enter is mapped to performing no action, that's why if you
> paste with Ctrl+Shift+V then all the newlines disappear.

Quite plausible analysis, thanks for figuring this out!

> 
> Now I have two patches, if you apply both then Shift+Insert and
> Ctrl+Shift+V should do the same (the expected behavior), and if
> bracketed paste is supported by the terminal then the menu entry will
> also do the same.

I'll give your patches a try as soon as time permits.

-- 
Best regards,
 Paul                          mailto:pmiscml at gmail.com



More information about the mc-devel mailing list