1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-09-01 17:14:15 -04:00

Correct a minor bug in cursor decrement (cpos_dec)

This commit is contained in:
John Zaitseff 2011-08-25 22:15:12 +10:00
parent dfab785ba7
commit cb67513bb9

View File

@ -1867,7 +1867,7 @@ void cpos_end (const wchar_t *restrict buf, int *restrict cpos,
void cpos_dec (const wchar_t *restrict buf, int *restrict cpos,
int *restrict st, int w, int width)
{
if (*cpos > 0) {
if (*cpos - w >= 0) {
// Cursor position is not yet in first column
*cpos -= w;
} else if (*st > 0) {