-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: e83923d934e6fd69797dc4f79e7e33746e59b362:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit e83923d934e6fd69797dc4f79e7e33746e59b362
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Sat Mar 30 08:47:06 2013 +0000

    Fix bug in core double-click word selection.

    selection_delimit_word does not account for (left) delimiters with width > 1.
    In such a case, it sets the starting position of the selection to the
    second column of the delimiter (thereby including the delimiter in the
    selection) rather than to the first column of the character next to it.
    This bug was masked before by 'selection_make' but a recent fix to the
    selection code revealed it.

diff --git a/Changes b/Changes

index c1c3e3258df10d3b5f22d526026fda8139134191..

index ..9b86f888acc59d1325b848c988624fd4276e5e5f 100644

--- a/Changes
+++ b/Changes
@@ -30,6 +30,9 @@ TODO: provide something like % for easy access for parse_keysym
 TODO: description into --help output?
 TODO: rxvt -help => (see rxvt-XXX(1))?

+	- fix regression that caused the core double-click word
+	  selection to erroneously include a tab on the left of the
+	  selected word.
 	- add support for the set cursor style (DECSCUSR) control
 	  function.
 	- honour cursorColor also when the cursor style is underline.
diff --git a/src/screen.C b/src/screen.C

index f36965afdaaa51b141e038cfa293b56372abc5b4..

index ..ed1345305b9c7e4a493f45a3a104da0f0e080dde 100644

--- a/src/screen.C
+++ b/src/screen.C
@@ -3074,6 +3074,14 @@ rxvt_term::selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, r

   if (dirn == DN)
     col++;                  /* put us on one past the end */
+  else
+    {
+      // if the delimiter on the left has width > 1 col points to the
+      // first NOCHAR in the delimiter cell and so we must move it to the
+      // beginning of the next cell.
+      while (ROW(row).t[col] == NOCHAR)
+        col++;
+    }

   /* Poke the values back in */
   ret->row = row;

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 10:22:02 2024