Felix Janda wrote: > 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;
This should have been: --- 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 - 1; 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