From 90b07fc2fdeeedd623d8af6be19003627b5474af Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 7 Oct 2005 15:57:48 +0000 Subject: [PATCH] in do_tab(), make sure that we insert the correct number of spaces if the TABS_TO_SPACES flag is set and placewewant is greater than the current column position of the cursor git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3041 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/text.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b0fdf24b..21912e58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -315,6 +315,10 @@ CVS code - get_history_completion() - Make parameters const where possible. (DLR) - text.c: + do_tab() + - Make sure that we insert the correct number of spaces if the + TABS_TO_SPACES flag is set and placewewant is greater than the + current column position of the cursor. (DLR) do_enter() - Don't update the edit window until we set placewewant. (DLR) break_line() diff --git a/src/text.c b/src/text.c index 8b8bb24f..30e62182 100644 --- a/src/text.c +++ b/src/text.c @@ -163,7 +163,7 @@ void do_tab(void) #ifndef NANO_SMALL if (ISSET(TABS_TO_SPACES)) { char *output; - size_t output_len = 0, new_pww = openfile->placewewant; + size_t output_len = 0, new_pww = xplustabs(); do { new_pww++; -- 2.39.5