Tweak KILL_TRAILING_SPACES. Still deciding on name...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5675 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
6fef9208da
commit
16c037fdb0
|
@ -10,7 +10,8 @@
|
||||||
2016-02-22 Chris Allegretta <chrisa@asty.org>
|
2016-02-22 Chris Allegretta <chrisa@asty.org>
|
||||||
* Add the ability to kill the trailing spaces when justifying text,
|
* Add the ability to kill the trailing spaces when justifying text,
|
||||||
by adding a new nanorc option 'kill_spaces_on_justify' -- we'll see
|
by adding a new nanorc option 'kill_spaces_on_justify' -- we'll see
|
||||||
whether this warrants a command-line flag or not.
|
whether this warrants a command-line flag or not. Now with slightly
|
||||||
|
better logic for multi-spaced lines.
|
||||||
|
|
||||||
2016-02-22 Benno Schulenberg <bensberg@justemail.net>
|
2016-02-22 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/nano.c (free_openfilestruct): Elide this function.
|
* src/nano.c (free_openfilestruct): Elide this function.
|
||||||
|
|
|
@ -2176,9 +2176,12 @@ void do_justify(bool full_justify)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Break the current line. */
|
/* Break the current line. */
|
||||||
if (ISSET(KILL_TRAILING_SPACES))
|
if (ISSET(KILL_TRAILING_SPACES)) {
|
||||||
null_at(&openfile->current->data, break_pos - 1);
|
while (break_pos > 0 &&
|
||||||
else
|
is_blank_mbchar(&openfile->current->data[break_pos-1])) {
|
||||||
|
break_pos--;
|
||||||
|
}
|
||||||
|
}
|
||||||
null_at(&openfile->current->data, break_pos);
|
null_at(&openfile->current->data, break_pos);
|
||||||
|
|
||||||
/* Go to the next line. */
|
/* Go to the next line. */
|
||||||
|
|
Loading…
Reference in New Issue