Commit feb89db8 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

more miscellaneous minor fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3016 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 239b4157
Showing with 16 additions and 12 deletions
+16 -12
CVS code - CVS code -
- General: - General:
- Miscellaneous comment fixes. (DLR) - Miscellaneous comment fixes. (DLR)
- More int -> bool conversions. (DLR)
- Fix a few last instances of the current line number's being - Fix a few last instances of the current line number's being
saved as an int instead of a ssize_t. Changes to saved as an int instead of a ssize_t. Changes to
renumber_all(), renumber(), do_alt_speller(), and renumber_all(), renumber(), do_alt_speller(), and
...@@ -302,6 +303,8 @@ CVS code - ...@@ -302,6 +303,8 @@ CVS code -
get_history_completion() get_history_completion()
- Make parameters const where possible. (DLR) - Make parameters const where possible. (DLR)
- text.c: - text.c:
do_enter()
- Don't update the edit window until we set placewewant. (DLR)
do_word_count() do_word_count()
- Rename to do_wordlinechar_count(), and expand to also count - Rename to do_wordlinechar_count(), and expand to also count
the number of lines and characters in the file or selection, the number of lines and characters in the file or selection,
......
...@@ -667,8 +667,8 @@ void reset_cursor(void); ...@@ -667,8 +667,8 @@ void reset_cursor(void);
void edit_add(const filestruct *fileptr, const char *converted, int void edit_add(const filestruct *fileptr, const char *converted, int
yval, size_t start); yval, size_t start);
void update_line(const filestruct *fileptr, size_t index); void update_line(const filestruct *fileptr, size_t index);
int need_horizontal_update(size_t old_pww); bool need_horizontal_update(size_t old_pww);
int need_vertical_update(size_t old_pww); bool need_vertical_update(size_t old_pww);
void edit_scroll(scroll_dir direction, ssize_t nlines); void edit_scroll(scroll_dir direction, ssize_t nlines);
void edit_redraw(const filestruct *old_current, size_t old_pww); void edit_redraw(const filestruct *old_current, size_t old_pww);
void edit_refresh(void); void edit_refresh(void);
......
...@@ -186,7 +186,7 @@ void do_tab(void) ...@@ -186,7 +186,7 @@ void do_tab(void)
#endif #endif
} }
/* Someone hits Return *gasp!* */ /* Someone hits Enter *gasp!* */
void do_enter(void) void do_enter(void)
{ {
filestruct *newnode = make_new_node(openfile->current); filestruct *newnode = make_new_node(openfile->current);
...@@ -234,11 +234,12 @@ void do_enter(void) ...@@ -234,11 +234,12 @@ void do_enter(void)
renumber(openfile->current); renumber(openfile->current);
openfile->current = newnode; openfile->current = newnode;
edit_refresh();
openfile->totsize++; openfile->totsize++;
set_modified(); set_modified();
openfile->placewewant = xplustabs(); openfile->placewewant = xplustabs();
edit_refresh();
} }
#ifndef NANO_SMALL #ifndef NANO_SMALL
......
...@@ -3477,10 +3477,10 @@ void update_line(const filestruct *fileptr, size_t index) ...@@ -3477,10 +3477,10 @@ void update_line(const filestruct *fileptr, size_t index)
mvwaddch(edit, line, COLS - 1, '$'); mvwaddch(edit, line, COLS - 1, '$');
} }
/* Return a nonzero value if we need an update after moving /* Return TRUE if we need an update after moving horizontally, and FALSE
* horizontally. We need one if the mark is on or if old_pww and * otherwise. We need one if the mark is on or if old_pww and
* placewewant are on different pages. */ * placewewant are on different pages. */
int need_horizontal_update(size_t old_pww) bool need_horizontal_update(size_t old_pww)
{ {
return return
#ifndef NANO_SMALL #ifndef NANO_SMALL
...@@ -3490,10 +3490,10 @@ int need_horizontal_update(size_t old_pww) ...@@ -3490,10 +3490,10 @@ int need_horizontal_update(size_t old_pww)
get_page_start(openfile->placewewant); get_page_start(openfile->placewewant);
} }
/* Return a nonzero value if we need an update after moving vertically. /* Return TRUE if we need an update after moving vertically, and FALSE
* We need one if the mark is on or if old_pww and placewewant * otherwise. We need one if the mark is on or if old_pww and
* are on different pages. */ * placewewant are on different pages. */
int need_vertical_update(size_t old_pww) bool need_vertical_update(size_t old_pww)
{ {
return return
#ifndef NANO_SMALL #ifndef NANO_SMALL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment