add chord fix from plan 9
This commit is contained in:
parent
6cb755b60b
commit
8b9a1d4cfe
2 changed files with 10 additions and 7 deletions
|
|
@ -115,9 +115,12 @@ wintaglines(Window *w, Rectangle r)
|
|||
|
||||
/* if tag ends with \n, include empty line at end for typing */
|
||||
n = w->tag.fr.nlines;
|
||||
bufread(&w->tag.file->b, w->tag.file->b.nc-1, &rune, 1);
|
||||
if(w->tag.file->b.nc > 0)
|
||||
bufread(&w->tag.file->b, w->tag.file->b.nc-1, &rune, 1);
|
||||
if(rune == '\n')
|
||||
n++;
|
||||
if(n == 0)
|
||||
n = 1;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue