]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
A combining character on U+0020 SPACE stops it from being
authorSimon Tatham <anakin@pobox.com>
Fri, 15 Oct 2004 11:42:02 +0000 (11:42 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 15 Oct 2004 11:42:02 +0000 (11:42 +0000)
`uninteresting' to the clipboard processing.

[originally from svn r4634]

terminal.c

index 54a17df680cbb485cfba15c3f38aafd625b2d9c1..c4d725abaa8371fcb76f6d48f9c3b6816c8336ae 100644 (file)
@@ -4804,6 +4804,7 @@ static void clipme(Terminal *term, pos top, pos bottom, int rect, int desel)
         */
        if (!(ldata->lattr & LATTR_WRAPPED)) {
            while (IS_SPACE_CHR(ldata->chars[nlpos.x - 1].chr) &&
+                  !ldata->chars[nlpos.x - 1].cc_next &&
                   poslt(top, nlpos))
                decpos(nlpos);
            if (poslt(nlpos, bottom))
@@ -5076,7 +5077,8 @@ static pos sel_spread_half(Terminal *term, pos p, int dir)
         */
        if (!(ldata->lattr & LATTR_WRAPPED)) {
            termchar *q = ldata->chars + term->cols;
-           while (q > ldata->chars && IS_SPACE_CHR(q[-1].chr))
+           while (q > ldata->chars &&
+                  IS_SPACE_CHR(q[-1].chr) && !q[-1].cc_next)
                q--;
            if (q == ldata->chars + term->cols)
                q--;