commit cf14ee2ef32d33a4ea0e53b1037f6918242b8deb
parent 8555820afc95731f3fa183e33285d1c4fbb56cd2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 17 Aug 2017 19:31:41 +0200
moving: the current chunk is always 0 when not in softwrap mode
This is a partial fix for https://savannah.gnu.org/bugs/?51770.
Analysis-by: David Lawrence Ramsey <pooka109@gmail.com>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/winio.c b/src/winio.c
@@ -3076,7 +3076,10 @@ size_t get_chunk_and_edge(size_t column, filestruct *line, size_t *leftedge)
* relative to the first row (zero-based). */
size_t chunk_for(size_t column, filestruct *line)
{
- return get_chunk_and_edge(column, line, NULL);
+ if (ISSET(SOFTWRAP))
+ return get_chunk_and_edge(column, line, NULL);
+ else
+ return 0;
}
/* Return the leftmost column of the softwrapped chunk of the given line that