commit 542426f1f1021ed3b4ed30ec73fbc918303acc40
parent 6319a8617831137aa7411e492056bdedbedad07b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 30 Apr 2019 09:44:47 +0200
tweaks: add a warning for something that shouldn't occur
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -287,9 +287,10 @@ void extract_buffer(linestruct **buffer_top, linestruct **buffer_bot,
bool same_line = FALSE;
#endif
- /* If the given coordinates don't cover any text, get out. */
- if (top == bot && top_x == bot_x)
+ if (top == bot && top_x == bot_x) {
+ statusline(ALERT, "Extracting nothing -- please report a bug");
return;
+ }
/* Partition the buffer so that it contains only the text from
* (top, top_x) to (bot, bot_x), keep track of whether the top of