[prev in list] [next in list] [prev in thread] [next in thread] 

List:       elinks-dev
Subject:    [elinks-dev] One character lines not displayed
From:       Felix Janda <felix.janda () posteo ! de>
Date:       2017-09-10 1:14:00
Message-ID: 20170910011400.GA13791 () nyan
[Download RAW message or body]

Hello,

since commit f3ab69bb13ece7d47b057ab50fa9db85b4b23746 when opening a
plain text file in elinks, lines of the file that contain exactly one
character are displayed as if they were empty.

The patch below appears to fix this particular issue.

Felix


--- a/src/viewer/text/draw.c
+++ b/src/viewer/text/draw.c
@@ -302,7 +302,7 @@ draw_doc(struct session *ses, struct document_view *doc_view, int active)
 				  en - st,
 				  &doc_view->document->data[y].chars[st]);
 
-			for (i = en - 1; i > 0; --i) {
+			for (i = en; i > 0; --i) {
 				if (doc_view->document->data[y].chars[i].data != ' ') {
 					last = &doc_view->document->data[y].chars[i];
 					last_index = i + 1;
-- 
http://lists.linuxfromscratch.org/listinfo/elinks-dev
Unsubscribe: See the above information page

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic