Patch for faster line copy

2013-02-23
2013-03-17
  • Hello everyone,

    Some time ago I submitted a very simple patch to allow copying a line of code without selecting it first. This is the default behavior in Visual Studio and I really miss it.

    http://sourceforge.net/p/notepad-plus/patches/429/

    The patch has been totally ignored with no feedback. What can I do to help it move forward?

    Thanks.

    Bryan

     
  • Loreia2
    Loreia2
    2013-02-23

    Hi Bryan,

    your patch is too simple. You need to go one step further and implement the same behavior for both cut and copy operations. Since with this patch you are changing default behavior, you should add an option to Configuration panel to enable or disable this option. A simple check box would do. By default this option should be disabled, to be backward compatible.

    When you do that, submit your patch for code review, and bump this thread to top.

    BR,
    Loreia

     
    Last edit: Loreia2 2013-02-23
  • I think a simpler patch, that adds only one line so that this Scintilla command is accessible in the shortcut mapper, could be accepted much faster. Not as easy to enable as with a checkbox, but still can be enabled without too much effort and it is is easy to show that it will not affect anyone who like the current behavior. Have you submitted a patch to Scintilla so the "cut" operation could also be added?

     
  • Loreia2
    Loreia2
    2013-02-23

    I see now that you requested form Neil Hodgson to implement SCI_CUTALLOWLINE. It is kind of weird that he refused to do it. I also wonder why he implemented one (COPY) without other (CUT). Anyway, someone patching Scintilla to add SCI_CUTALLOWLINE should be the first step.

    BR,
    Loreia

     
  • This is a feature that I don't think should be optional. It's not intrusive at all and you could go your whole life without knowing it's there. It's like Control+Backspace, 99% of people have no idea it's there, even heavy computer users. Having it optional would just confuse things more. It's already can be configured via the existing keybinding system.

    At a minimum I agree with Francois, that CopyAllowLine should be added as an option so that I can go in and select it manually. To do that please just add this to the key bindings available inside Parameters.cpp:

    {TEXT("SCI_COPYALLOWLINE"), SCI_COPYALLOWLINE, true,  false, false, 0, 0},
    

    I don't see any reason why CopyAllowLine needs to wait on a cutallowline.