display: scroll horizontally one column earlier
In this way, for single-width characters, one can see what character is ahead of the cursor before actually moving the cursor to that position, and, for double-width characters, the cursor never sits on a placeholder but always shows the character that is actually there. This addresses https://savannah.gnu.org/bugs/?55716.master
parent
37c8232f4d
commit
85e895508b
|
@ -367,10 +367,10 @@ char *free_and_assign(char *dest, char *src)
|
||||||
* get_page_start(column) < COLS). */
|
* get_page_start(column) < COLS). */
|
||||||
size_t get_page_start(size_t column)
|
size_t get_page_start(size_t column)
|
||||||
{
|
{
|
||||||
if (column < editwincols - 1 || ISSET(SOFTWRAP) || column == 0)
|
if (column + 2 < editwincols || ISSET(SOFTWRAP) || column == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else if (editwincols > 8)
|
else if (editwincols > 8)
|
||||||
return column - 7 - (column - 7) % (editwincols - 8);
|
return column - 6 - (column - 6) % (editwincols - 8);
|
||||||
else
|
else
|
||||||
return column - (editwincols - 2);
|
return column - (editwincols - 2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue