summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2020-04-29 13:25:46 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2020-04-29 13:25:46 -0300
commit839ff03b98de80ba367872f5f6d8cd28e706152b (patch)
treeb4c166f50687db020d8c443029b535704683fecb
parent171ace02cb9a57a6552c1534d7dbf5ab5f037754 (diff)
downloadjet-839ff03b98de80ba367872f5f6d8cd28e706152b.tar.gz
jet-839ff03b98de80ba367872f5f6d8cd28e706152b.zip
Fix prev_line moving too much on long lines
-rw-r--r--point.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/point.c b/point.c
index 755b99f..515d73d 100644
--- a/point.c
+++ b/point.c
@@ -67,7 +67,7 @@ uint64_t rseek(struct point *point, uint8_t c, int limit) {
void prev_line(struct point *point, int window_width) {
move_point_backward(point);
move_point_backward(point);
- rseek(point, '\n', window_width);
+ rseek(point, '\n', window_width - 2);
if (element(point) == '\n') {
move_point_forward(point);
}