Revision: 2659
          http://tmux.svn.sourceforge.net/tmux/?rev=2659&view=rev
Author:   tcunha
Date:     2012-01-20 21:16:07 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
Sync OpenBSD patchset 997:

Calculate last position correctly for UTF-8 wide characters, reported by
Matthias Lederhofer.

Modified Paths:
--------------
    trunk/tty.c

Modified: trunk/tty.c
===================================================================
--- trunk/tty.c 2012-01-20 20:18:20 UTC (rev 2658)
+++ trunk/tty.c 2012-01-20 21:16:07 UTC (rev 2659)
@@ -969,7 +969,10 @@
                         * move as far left as possible and redraw the last
                         * cell to move into the last position.
                         */
-                       cx = screen_size_x(s) - width;
+                       if (ctx->last_cell.flags & GRID_FLAG_UTF8)
+                               cx = screen_size_x(s) - ctx->last_utf8.width;
+                       else
+                               cx = screen_size_x(s) - 1;
                        tty_cursor_pane(tty, ctx, cx, ctx->ocy);
                        tty_cell(tty, &ctx->last_cell, &ctx->last_utf8);
                }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to