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
/* 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);
move_to_filestruct(&cutbuffer, &cutbottom, openfile->current, 0,
openfile->current, data_len);
- openfile->placewewant = xplustabs();
+ openfile->placewewant = 0;
}
#ifndef NANO_SMALL