Problem with \r in SEL_SETTEXT+

  • CorruptedFile

    CorruptedFile - 2013-01-03

    It looks like something may be missing in the SEL_SETTEXT+ command.

    "SEL_SETTEXT+ \tFirst Line\r\n\t\tSecond line\r\n" should give me the following:

        First Line
            Second Line

    But, instead, I get:

        First Line\r
            Second Line\r

    Am I missing something, or is this a bug?

    Thank you for your help.

  • DV

    DV - 2013-01-03

    Executing "help sel_settext+" from the Console shows: 

      Use sel_settext+ to insert special characters: 
      \n  - new line; 
      \\n - \n; 
      \t  - tabulation character.

    There's no \r or other mentioned. Doesn't Scintilla adapts new line character(s) according to the file's ones?

  • DV

    DV - 2013-01-05

    Anyway, the support of "\r" could be easily implemented. The source file "NppExec\src\NppExecEngine.cpp", function CScriptEngine::DoSelSetTextEx. 
    If required, this can be done as a quick update to current version of NppExec.

  • CorruptedFile

    CorruptedFile - 2013-01-08

    Unfortunately, no, the EOL characters are not adapted to the current file's format. 

    The script I have written outputs the lines with the  missing in a previously 'Windows EOL' formatted file.  Of course Notepad++ doesn't care and still displays the lines correctly.  However, when my boss opens it with MS Notepad all the lines added by my script are on one line due to the missing .

    If you could please add the \r function to the sel_settext+ command that would be awesome.

  • CorruptedFile

    CorruptedFile - 2013-01-11

    Excellent, works great now!!!


  • DV

    DV - 2013-04-17

    NppExec v0.5.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks