GNOME Bugzilla – Bug 323886
Selecting a line should also select the line ending
Last modified: 2018-05-02 14:14:45 UTC
Distribution/Version: Ubuntu 5.10 A whole line of text in gedit can be selected with a triple mouse click. However, this doesn't include the newline character in the selection. Consequence: using cut & paste or drag & drop to move the line glues it to the following line at the destination, and messes up indentation.
GtkTextView issue. No idea if there is a rationale or if it's "just a bug"
If it is a bug, it is shared e.g. by firefox
It occurs to me that a potential problem with selecting the newline is that, if you then paste the text to a GtkEntry (or any other one-line text area widget), you'll get an annoying box thing representing the newline. Perhaps we could make GtkTextView select the newline, but then have GtkEntry (and other one-line text area widgets) strip *trailing* newlines from pasted data. Selecting the newline means that triple-click+delete will really kill the line, which seems more natural to me for line-oriented editors. I do firmly believe that each application should decide the double-click and triple-click select behavior that works best for its users. I also firmly believe that applications want to be anthropomorphized.
Interesting reverse inconsistency: nautilus *does* take a newline when you copy a file and paste in a text context, but it shouldn't (Bug 360441).
What browsers do in their html views is irrelevant. Browsers are very different from editors because they are not *editors*. Besides, try to triple-click a line in an text box in mozilla, it will select line end (you can try it right here, in the comment box). Plain GtkTextView bug. Same as "Ctrl-Left will not jump to the left because there is no word on the left". Just happened so. Impossible to fix since "it's good" too.
*** Bug 451863 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/253.