[hackers] [st] fixed newline bug. || Aurélien Aptel

From: <hg_AT_suckless.org>
Date: Thu, 14 Oct 2010 17:20:29 +0000 (UTC)

changeset: 154:00cdef4a11bb
tag: tip
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Thu Oct 14 19:21:12 2010 +0200
files: st.c
description:
fixed newline bug.

diff -r ae558fc2eb69 -r 00cdef4a11bb st.c
--- a/st.c Wed Oct 13 01:27:09 2010 +0200
+++ b/st.c Thu Oct 14 19:21:12 2010 +0200
@@ -627,12 +627,13 @@
 
 void
 tnewline(void) {
+ int x = term.c.x+1 < term.col ? term.c.x : 0;
         int y = term.c.y;
         if(term.c.y == term.bot)
                 tscrollup(term.top, 1);
         else
                 y++;
- tmoveto(0, y);
+ tmoveto(x, y);
 }
 
 void
Received on Thu Oct 14 2010 - 19:20:29 CEST

This archive was generated by hypermail 2.2.0 : Thu Oct 14 2010 - 19:24:04 CEST