mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 04:41:21 +03:00
Eliding two variables.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5389 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
bf84e5972d
commit
d0e8887e3b
@ -1,6 +1,7 @@
|
||||
2015-11-02 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/nano.h: Delete an unused type definition.
|
||||
* src/nano.h: Improve several comments.
|
||||
* src_text.c(do_wrap): Elide two variables.
|
||||
|
||||
2015-10-31 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/nano.c (copy_from_filestruct): When pasting while the mark is
|
||||
|
16
src/text.c
16
src/text.c
@ -1190,12 +1190,6 @@ bool do_wrap(filestruct *line)
|
||||
/* The length of the line we wrap. */
|
||||
ssize_t wrap_loc;
|
||||
/* The index of line->data where we wrap. */
|
||||
#ifndef NANO_TINY
|
||||
const char *indent_string = NULL;
|
||||
/* Indentation to prepend to the new line. */
|
||||
size_t indent_len = 0;
|
||||
/* The length of indent_string. */
|
||||
#endif
|
||||
const char *after_break;
|
||||
/* The text after the wrap point. */
|
||||
size_t after_break_len;
|
||||
@ -1245,14 +1239,8 @@ bool do_wrap(filestruct *line)
|
||||
#ifndef NANO_TINY
|
||||
/* If autoindent is turned on, and we're on the character just after
|
||||
* the indentation, we don't wrap. */
|
||||
if (ISSET(AUTOINDENT)) {
|
||||
/* Get the indentation of this line. */
|
||||
indent_string = line->data;
|
||||
indent_len = indent_length(indent_string);
|
||||
|
||||
if (wrap_loc == indent_len)
|
||||
return FALSE;
|
||||
}
|
||||
if (ISSET(AUTOINDENT) && wrap_loc == indent_length(line->data))
|
||||
return FALSE;
|
||||
|
||||
add_undo(SPLIT_BEGIN);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user