Not checking again for a condition that was checked before.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5274 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
6062a040e1
commit
296ff1ed2a
|
@ -2,6 +2,8 @@
|
||||||
* src/browser.c (browser_refresh): Limit the selected file to the
|
* src/browser.c (browser_refresh): Limit the selected file to the
|
||||||
available ones in the list -- after a refresh the number may have
|
available ones in the list -- after a refresh the number may have
|
||||||
decreased. This fixes Savannah bug #45424.
|
decreased. This fixes Savannah bug #45424.
|
||||||
|
* src/text.c (do_deletion): There is no need to check again for the
|
||||||
|
line ending -- it was done already in the encompassing 'if'.
|
||||||
|
|
||||||
2015-06-27 Benno Schulenberg <bensberg@justemail.net>
|
2015-06-27 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/text.c (do_undo, add_undo): Skip undoing a backspace *only* when
|
* src/text.c (do_undo, add_undo): Skip undoing a backspace *only* when
|
||||||
|
|
|
@ -123,10 +123,6 @@ void do_deletion(undo_type action)
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
add_undo(action);
|
add_undo(action);
|
||||||
#endif
|
#endif
|
||||||
/* If we're deleting at the end of a line, we need to call
|
|
||||||
* edit_refresh(). */
|
|
||||||
if (openfile->current->data[openfile->current_x] == '\0')
|
|
||||||
edit_refresh_needed = TRUE;
|
|
||||||
|
|
||||||
openfile->current->data = charealloc(openfile->current->data,
|
openfile->current->data = charealloc(openfile->current->data,
|
||||||
strlen(openfile->current->data) + strlen(foo->data) + 1);
|
strlen(openfile->current->data) + strlen(foo->data) + 1);
|
||||||
|
@ -146,6 +142,9 @@ void do_deletion(undo_type action)
|
||||||
renumber(openfile->current);
|
renumber(openfile->current);
|
||||||
openfile->totsize--;
|
openfile->totsize--;
|
||||||
|
|
||||||
|
/* Two lines were joined, so we need to refresh the screen. */
|
||||||
|
edit_refresh_needed = TRUE;
|
||||||
|
|
||||||
/* If the NO_NEWLINES flag isn't set, and text has been added to
|
/* If the NO_NEWLINES flag isn't set, and text has been added to
|
||||||
* the magicline as a result of deleting at the end of the line
|
* the magicline as a result of deleting at the end of the line
|
||||||
* before filebot, add a new magicline. */
|
* before filebot, add a new magicline. */
|
||||||
|
|
Loading…
Reference in New Issue