Re: [dev] [st] [PATCH] Correct shift amount on MODE_INSERT in tputc()

2015-01-29 Thread Rian Hunter
Oops last patch sent was a little off. This one is more correct.a >From 5e94d1031f349050f86c943c87ccf13eb74ccbc3 Mon Sep 17 00:00:00 2001 From: Rian Hunter Date: Thu, 29 Jan 2015 15:00:39 -0800 Subject: [PATCH] Correct shift amount on MODE_INSERT in tputc() When MODE_INSERT is set we'd shift cha

Re: [dev] [st] [PATCH] Correct shift amount on MODE_INSERT in tputc()

2015-01-29 Thread FRIGN
On Thu, 29 Jan 2015 15:08:39 -0800 Rian Hunter wrote: > When MODE_INSERT is set we'd shift characters on the same > line forward before inserting our character in tputc(). > This did not account for wide characters where width != 1. > This patch makes it so we shift the correct amount. > - i

[dev] [st] [PATCH] Correct shift amount on MODE_INSERT in tputc()

2015-01-29 Thread Rian Hunter
When MODE_INSERT is set we'd shift characters on the same line forward before inserting our character in tputc(). This did not account for wide characters where width != 1. This patch makes it so we shift the correct amount. --- st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[dev] [st] [PATCH] Fix crash due to wide characters

2015-01-29 Thread Rian Hunter
In tputc(), when a character wasn't large enough to fit on the current line, we would call tnewline() to place it on the next line. Unfortunately, we weren't resetting our glyph pointer and this caused memory corruption when a wide character (width == 2) was being written. This patch resets our gly

Re: [dev] [PATCH] Check for presence of SHELL environment variable

2015-01-29 Thread Christoph Lohmann
On Thu, 06 Nov 2014 19:18:32 +0100 k...@shike2.com wrote: > > >> HOME must hold the value of the user's home directory, if this > >> value is not the value of /etc/passwd then you have an error > >> in your configuration. The same can be said about SHELL. You > >> can change your shell selection u