Commit Graph
13 Commits
Author SHA1 Message Date
nonameandRoberto E. Vargas Caballero fe527aa508 Do not set dirty flag twice in tscrollup and tscrolldown. 2014-04-23 20:37:59 +02:00
nonameandRoberto E. Vargas Caballero 3afdb4ff04 Use tsetdirt in tscrollup and tscrolldown.
tscrollup and tscrolldown do not use tsetdirt, but their code is
equivalent to

        tsetdirt(orig, term.bot-n);
        tsetdirt(orig+n, term.bot);

tclearregion also marks cleared lines as dirty.
In tscrolldown it sets lines from term.bot-n+1 to term.bot dirty, and in
tscrollup it sets lines from orig to orig+n-1 dirty.

In both functions all lines from orig to term.bot are effectively set
dirty, but in tscrolldown lines from orig+n to term.bot are set dirty
twice, and in tscrollup lines from orig to term.bot-n are set dirty
twice.

These patches make it clear which lines are set dirty and sets them
dirty once in each funciton.
2014-04-23 20:35:16 +02:00
nonameandRoberto E. Vargas Caballero f9dc374ea0 Fix techo handling of control and multibyte characters.
techo compares signed char to '\x20'. Any character with code less then
'\x20' is treated as control character.  This way characters with MSB
set to 1 are considered control characters too.

Also this patch makes techo display DEL character as ^?.

To reprocuce the bug, enable echo mode using printf '\e[12l',
then type DEL character or any non-ASCII character.
2014-04-23 20:31:45 +02:00
nonameandRoberto E. Vargas Caballero fa19f241a3 Make xrealloc and xstrdup style consistent. 2014-04-23 15:39:04 +02:00
nonameandRoberto E. Vargas Caballero df1810dd8f Use BETWEEN in tsetchar. 2014-04-23 15:39:03 +02:00
nonameandRoberto E. Vargas Caballero ed855ea432 Use uint and uchar instead of unsigned int and unsigned char. 2014-04-23 15:39:03 +02:00
nonameandRoberto E. Vargas Caballero 68d97457ec Remove argument names from function prototypes. 2014-04-23 15:39:03 +02:00
nonameandRoberto E. Vargas Caballero 49672dac7b Style fix in tdumpsel. 2014-04-23 15:39:02 +02:00
nonameandRoberto E. Vargas Caballero f21e47f44a Use BETWEEN in tinsertblankline and tdeleteline. 2014-04-23 15:39:02 +02:00
noname@inventati.organdRoberto E. Vargas Caballero 1388870331 move MODBIT to Macros section
Patch moves MODBIT to macros section and uses it in tselcs.
2014-04-20 21:13:37 +02:00
noname@inventati.organdRoberto E. Vargas Caballero 6b56cbf9cc misplaced parenthesis in LEN macro 2014-04-20 21:07:04 +02:00
noname@inventati.organdRoberto E. Vargas Caballero 4ad2fc7f18 Simplify techo
Remove special case for \e because it is handled well by "control code"
case.
2014-04-15 08:16:39 +02:00
noname@inventati.organdRoberto E. Vargas Caballero dc74c4f729 typedefs instead of #defines
Replaced #defines with typedefs where possible, patch attached.
2014-04-15 08:14:46 +02:00