Skip to content

Commit

Permalink
Fix pos_rehead when -S doesn't change,
Browse files Browse the repository at this point in the history
but chopping changes due to hshift changing.
  • Loading branch information
gwsw committed Sep 12, 2023
1 parent f548d98 commit 68702d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions position.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,13 @@ static POSITION beginning_of_line(POSITION tpos)
/*
* When viewing long lines, it may be that the first char in the top screen
* line is not the first char in its (file) line (the table is "beheaded").
* (The top line on the screen is the only one that can be in this state.)
* This function sets that entry to the position of the first char in the line.
* This function sets that entry to the position of the first char in the line,
* and sets hshift so that the first char in the first line is unchanged.
*/
public void pos_rehead(void)
{
POSITION linepos;
POSITION tpos = table[TOP];
if (!chopline)
return;
if (tpos == NULL_POSITION)
return;
linepos = beginning_of_line(tpos);
Expand Down

0 comments on commit 68702d9

Please sign in to comment.