add DB's patch to simplify do_next_word() and remove references to
editbot in it so as to avoid a segfault git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
c6908f28b7
commit
bf3c93e268
|
@ -66,6 +66,9 @@ CVS code -
|
||||||
- Remove the now-unneeded code to disable XON, XOFF, and
|
- Remove the now-unneeded code to disable XON, XOFF, and
|
||||||
suspend, since we now go into raw mode in
|
suspend, since we now go into raw mode in
|
||||||
get_verbatim_kbinput() and bypass them. (DLR)
|
get_verbatim_kbinput() and bypass them. (DLR)
|
||||||
|
do_next_word()
|
||||||
|
- Simplify and remove references to editbot so as to avoid a
|
||||||
|
segfault. (David Benbennick)
|
||||||
do_int_speller(), do_alt_speller(), do_spell()
|
do_int_speller(), do_alt_speller(), do_spell()
|
||||||
- Modify to write only the current selection from a file to the
|
- Modify to write only the current selection from a file to the
|
||||||
temporary file used for spell checking when the mark is on,
|
temporary file used for spell checking when the mark is on,
|
||||||
|
|
31
src/nano.c
31
src/nano.c
|
@ -1173,8 +1173,6 @@ int do_enter(void)
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
int do_next_word(void)
|
int do_next_word(void)
|
||||||
{
|
{
|
||||||
filestruct *old = current;
|
|
||||||
|
|
||||||
assert(current != NULL && current->data != NULL);
|
assert(current != NULL && current->data != NULL);
|
||||||
|
|
||||||
/* Skip letters in this word first. */
|
/* Skip letters in this word first. */
|
||||||
|
@ -1197,31 +1195,10 @@ int do_next_word(void)
|
||||||
|
|
||||||
placewewant = xplustabs();
|
placewewant = xplustabs();
|
||||||
|
|
||||||
if (current->lineno >= editbot->lineno) {
|
/* Refresh the screen. If current has run off the bottom, this
|
||||||
/* If we're on the last line, don't center the screen. */
|
* call puts it at the center line. */
|
||||||
if (current->lineno == filebot->lineno)
|
edit_refresh();
|
||||||
edit_refresh();
|
|
||||||
else
|
|
||||||
edit_update(current, CENTER);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* If we've jumped lines, refresh the old line. We can't just
|
|
||||||
use current->prev here, because we may have skipped over some
|
|
||||||
blank lines, in which case the previous line is the wrong
|
|
||||||
one. */
|
|
||||||
if (current != old) {
|
|
||||||
update_line(old, 0);
|
|
||||||
/* If the mark was set, then the lines between old and
|
|
||||||
current have to be updated too. */
|
|
||||||
if (ISSET(MARK_ISSET)) {
|
|
||||||
while (old->next != current) {
|
|
||||||
old = old->next;
|
|
||||||
update_line(old, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
update_line(current, current_x);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue