cut_marked_segment()
- Add magic line when cutting a selection including filebot
(discovered by DLR, fixed by DLR & Chris)
+ do_cut_text()
+ - Don't recenter the line when cutting one line (DLR).
- files.c:
do_writeout()
- Expanded strings to not use %s and ?: to determine
{
filestruct *tmp, *fileptr = current;
#ifndef NANO_SMALL
+ int cuttingpartialline = 0;
int cuttingtoend = 0;
#endif
}
}
if (ISSET(MARK_ISSET)) {
- if (current->lineno <= mark_beginbuf->lineno)
+ if (current->lineno <= mark_beginbuf->lineno) {
+ if (current->lineno == mark_beginbuf->lineno)
+ cuttingpartialline = 1;
cut_marked_segment(current, current_x, mark_beginbuf,
mark_beginx, 1);
+ }
else
cut_marked_segment(mark_beginbuf, mark_beginx, current,
current_x, 1);
marked_cut = 1;
set_modified();
- if (cuttingtoend)
+ if (cuttingpartialline || cuttingtoend)
edit_refresh();
else
edit_update(current, CENTER);