Playground doesn't respect LF endings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Playground doesn't respect LF endings

Peter Uhnak
Hi,

when I paste a text into the playground with line endings containing just LF (unix-style), then navigation to beginning/end of a line instead jumps to the beginning/end of the text. (I guess it is hardcoded to CR only).

Right now I have to execute `Clipboard clipboardText withSqueakLineEndings asString` and then copy&paste the result.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: Playground doesn't respect LF endings

Henrik-Nergaard

>> Right now I have to execute `Clipboard clipboardText withSqueakLineEndings asString` and then copy&paste the result.

Why not fix the issue instead?

  • Browse senders of #cr
  • Filter "rub"
  • Find  the method that navigates the cursor to line end
    • change #indexOf::: to use #indexOfAnyOf::: with lf as well.
    • move 1 more step if pos is cr and next is lf
  • do something similar for home navigation

Best regards,
Henrik


Fra: Pharo-users <[hidden email]> på vegne av Peter Uhnak <[hidden email]>
Sendt: 8. august 2017 07:41:46
Til: [hidden email]
Emne: [Pharo-users] Playground doesn't respect LF endings
 
Hi,

when I paste a text into the playground with line endings containing just LF (unix-style), then navigation to beginning/end of a line instead jumps to the beginning/end of the text. (I guess it is hardcoded to CR only).

Right now I have to execute `Clipboard clipboardText withSqueakLineEndings asString` and then copy&paste the result.

Peter