Menu

#180 Insert new line below and above current line without indentation

Undefined
applied
editor (11)
Patch
2017-08-06
2015-06-20
scarphin
No

The patch adds 2 menu items in 'edit->special commands->other' to insert a new line below and above the current line without indentation respectively.
Notapad++ has this feature, CB may also benefit from that.

1 Attachments

Discussion

  • ollydbg

    ollydbg - 2015-06-28

    1, I'm OK with this patch, what does other C::B dev's opinion?
    2, I think the patch can have two improvements.
    a, we have a global function named "wxString GetEOLStr(int eolMode)", which already handle the eol to string.
    b, I suggest add one line doxygen style comment in the main.h, such as:

    /** Insert unindented new line below current line */
    void OnEditInsertNewLineBelow(wxCommandEvent& event);
    

    (Though we don't have much comments in the existing code, but I think it is still very important to add some comments especially for the new added code)
    Thank you very much for your contribution.

     
    • scarphin

      scarphin - 2015-06-30

      2.a I'm not sure how to use a wxString for EOL character so please feel free to make whatever changes necessary.

       
  • ollydbg

    ollydbg - 2015-06-28
    • labels: --> editor
     
  • Teodor Petrov

    Teodor Petrov - 2017-08-06
    • status: open --> applied
    • assigned_to: Teodor Petrov
     
  • Teodor Petrov

    Teodor Petrov - 2017-08-06

    Applied in rev 11125. Thanks for the contribution.

    I'm not sure how these two commands are useful in everyday life.
    Can you show an example workflow?
    Why do you want the added line to be unindented?

     

Log in to post a comment.

MongoDB Logo MongoDB