[konsole] [Bug 421480] Pasting multiline text from Firefox results in double new lines between each text block

Ahmad Samir bugzilla_noreply at kde.org
Mon Jun 15 21:33:06 BST 2020


https://bugs.kde.org/show_bug.cgi?id=421480

Ahmad Samir <a.samirh78 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/util
                   |                            |ities/konsole/commit/a10224
                   |                            |42dc2f59321976fd3456ad97c61
                   |                            |300d1f2
             Status|CONFIRMED                   |RESOLVED
   Version Fixed In|                            |20.08
         Resolution|---                         |FIXED

--- Comment #3 from Ahmad Samir <a.samirh78 at gmail.com> ---
Git commit a1022442dc2f59321976fd3456ad97c61300d1f2 by Ahmad Samir.
Committed on 15/06/2020 at 20:29.
Pushed by ahmadsamir into branch 'master'.

Don't add extra newlines when pasting from GTK applications

Due to some internal handling in GTK itself, we end up with text copied
from Firefox where a newline is represented as CRLF (\r\n); since the
doPaste() method replaces each \n with \r, we ended up with \r\r, which
ultimately led to extra newlines in the pasted code. To fix the issue
simply detect the CRLF case and replace each \r\n with \r.

To test, copy some multiline text from Firefox, open vim in konsole and
paste, you end up with two newlines between each block of text. Compare the
results after applying this patch
FIXED-IN: 20.08

M  +4    -0    src/TerminalDisplay.cpp

https://invent.kde.org/utilities/konsole/commit/a1022442dc2f59321976fd3456ad97c61300d1f2

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list