diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-04-27 10:50:35 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-04-27 10:50:35 -0300 |
commit | 7ceba65d88079536d3b4b7132ad93fb3943c483d (patch) | |
tree | 21bf370383388b8615448f603c3c444d4146233b /jet.c | |
parent | cc670044329369c5f15580a901c3a6ac81899929 (diff) | |
download | jet-7ceba65d88079536d3b4b7132ad93fb3943c483d.tar.gz jet-7ceba65d88079536d3b4b7132ad93fb3943c483d.zip |
Fix scrolling bug
Diffstat (limited to 'jet.c')
-rw-r--r-- | jet.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -38,11 +38,11 @@ int main(int argc, char *argv[]) { int number_of_lines = 0; int x = -1, y = -1; for (struct point i = {page, 0}; !at_eof(&i); move_point_forward(&i)) { - if (element(&i) == '\n') number_of_lines++; if (same_location(&i, &cursor)) { getyx(stdscr, y, x); } if (number_of_lines >= current_line && number_of_lines < window_height + current_line) addch(element(&i)); + if (element(&i) == '\n') number_of_lines++; } if (x > -1 && y > -1) { move(y, x); |