mirror of git://git.sv.gnu.org/nano.git
in cut_line(), since placewewant will always be zero after the line is
cut, set it to zero directly instead of assigning it the value of xplustabs() git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3116 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
0f6236f556
commit
b387137af7
|
@ -82,6 +82,11 @@ CVS code -
|
|||
character as having the width of Unicode U+FFFD (Replacement
|
||||
Character) instead of having a width of zero, since display
|
||||
problems can crop up with the latter approach. (DLR)
|
||||
- cut.c:
|
||||
cut_line()
|
||||
- Since placewewant will always be zero after the line is cut,
|
||||
set it to zero directly instead of assigning it the value of
|
||||
xplustabs(). (DLR)
|
||||
- files.c:
|
||||
read_file()
|
||||
- Remove apparently unneeded logic to handle a case where
|
||||
|
|
10
src/cut.c
10
src/cut.c
|
@ -40,10 +40,10 @@ void cutbuffer_reset(void)
|
|||
|
||||
/* If we're not on the last line of the file, move all the text of the
|
||||
* current line, plus the newline at the end, to the cutbuffer, and set
|
||||
* the current place we want to where the line used to start. If we
|
||||
* are, and the last line of the file isn't blank, move all of the text
|
||||
* of the current line to the cutbuffer, and set the current place we
|
||||
* want to where the now-blank line starts. */
|
||||
* the current place we want to the beginning of the now-nonexistent
|
||||
* line. If we are, and the last line of the file isn't blank, move all
|
||||
* of the text of the current line to the cutbuffer, and set the current
|
||||
* place we want to the beginning of the now-blank line. */
|
||||
void cut_line(void)
|
||||
{
|
||||
size_t data_len = strlen(openfile->current->data);
|
||||
|
@ -57,7 +57,7 @@ void cut_line(void)
|
|||
move_to_filestruct(&cutbuffer, &cutbottom, openfile->current, 0,
|
||||
openfile->current, data_len);
|
||||
|
||||
openfile->placewewant = xplustabs();
|
||||
openfile->placewewant = 0;
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
|
|
Loading…
Reference in New Issue