- cut.c:do_cut_text() - Don't recenter the line when cutting one line (DLR)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@818 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
a2d849bcd4
Коммит
dc2ca88718
@ -34,6 +34,8 @@ CVS code -
|
|||||||
cut_marked_segment()
|
cut_marked_segment()
|
||||||
- Add magic line when cutting a selection including filebot
|
- Add magic line when cutting a selection including filebot
|
||||||
(discovered by DLR, fixed by DLR & Chris)
|
(discovered by DLR, fixed by DLR & Chris)
|
||||||
|
do_cut_text()
|
||||||
|
- Don't recenter the line when cutting one line (DLR).
|
||||||
- files.c:
|
- files.c:
|
||||||
do_writeout()
|
do_writeout()
|
||||||
- Expanded strings to not use %s and ?: to determine
|
- Expanded strings to not use %s and ?: to determine
|
||||||
|
8
cut.c
8
cut.c
@ -194,6 +194,7 @@ int do_cut_text(void)
|
|||||||
{
|
{
|
||||||
filestruct *tmp, *fileptr = current;
|
filestruct *tmp, *fileptr = current;
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
int cuttingpartialline = 0;
|
||||||
int cuttingtoend = 0;
|
int cuttingtoend = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -252,9 +253,12 @@ int do_cut_text(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ISSET(MARK_ISSET)) {
|
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,
|
cut_marked_segment(current, current_x, mark_beginbuf,
|
||||||
mark_beginx, 1);
|
mark_beginx, 1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
cut_marked_segment(mark_beginbuf, mark_beginx, current,
|
cut_marked_segment(mark_beginbuf, mark_beginx, current,
|
||||||
current_x, 1);
|
current_x, 1);
|
||||||
@ -264,7 +268,7 @@ int do_cut_text(void)
|
|||||||
|
|
||||||
marked_cut = 1;
|
marked_cut = 1;
|
||||||
set_modified();
|
set_modified();
|
||||||
if (cuttingtoend)
|
if (cuttingpartialline || cuttingtoend)
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
else
|
else
|
||||||
edit_update(current, CENTER);
|
edit_update(current, CENTER);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user