A combining character on U+0020 SPACE stops it from being
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 15 Oct 2004 11:42:02 +0000 (11:42 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 15 Oct 2004 11:42:02 +0000 (11:42 +0000)
`uninteresting' to the clipboard processing.

git-svn-id: svn://svn.tartarus.org/sgt/putty@4634 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index 54a17df..c4d725a 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--;