more miscellaneous minor fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3016 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-09-13 04:45:46 +00:00
parent 239b415786
commit feb89db8a0
4 changed files with 16 additions and 12 deletions

View File

@ -1,6 +1,7 @@
CVS code -
- General:
- Miscellaneous comment fixes. (DLR)
- More int -> bool conversions. (DLR)
- Fix a few last instances of the current line number's being
saved as an int instead of a ssize_t. Changes to
renumber_all(), renumber(), do_alt_speller(), and
@ -302,6 +303,8 @@ CVS code -
get_history_completion()
- Make parameters const where possible. (DLR)
- text.c:
do_enter()
- Don't update the edit window until we set placewewant. (DLR)
do_word_count()
- Rename to do_wordlinechar_count(), and expand to also count
the number of lines and characters in the file or selection,

View File

@ -667,8 +667,8 @@ void reset_cursor(void);
void edit_add(const filestruct *fileptr, const char *converted, int
yval, size_t start);
void update_line(const filestruct *fileptr, size_t index);
int need_horizontal_update(size_t old_pww);
int need_vertical_update(size_t old_pww);
bool need_horizontal_update(size_t old_pww);
bool need_vertical_update(size_t old_pww);
void edit_scroll(scroll_dir direction, ssize_t nlines);
void edit_redraw(const filestruct *old_current, size_t old_pww);
void edit_refresh(void);

View File

@ -186,7 +186,7 @@ void do_tab(void)
#endif
}
/* Someone hits Return *gasp!* */
/* Someone hits Enter *gasp!* */
void do_enter(void)
{
filestruct *newnode = make_new_node(openfile->current);
@ -234,11 +234,12 @@ void do_enter(void)
renumber(openfile->current);
openfile->current = newnode;
edit_refresh();
openfile->totsize++;
set_modified();
openfile->placewewant = xplustabs();
edit_refresh();
}
#ifndef NANO_SMALL

View File

@ -3477,10 +3477,10 @@ void update_line(const filestruct *fileptr, size_t index)
mvwaddch(edit, line, COLS - 1, '$');
}
/* Return a nonzero value if we need an update after moving
* horizontally. We need one if the mark is on or if old_pww and
/* Return TRUE if we need an update after moving horizontally, and FALSE
* otherwise. We need one if the mark is on or if old_pww and
* placewewant are on different pages. */
int need_horizontal_update(size_t old_pww)
bool need_horizontal_update(size_t old_pww)
{
return
#ifndef NANO_SMALL
@ -3490,10 +3490,10 @@ int need_horizontal_update(size_t old_pww)
get_page_start(openfile->placewewant);
}
/* Return a nonzero value if we need an update after moving vertically.
* We need one if the mark is on or if old_pww and placewewant
* are on different pages. */
int need_vertical_update(size_t old_pww)
/* Return TRUE if we need an update after moving vertically, and FALSE
* otherwise. We need one if the mark is on or if old_pww and
* placewewant are on different pages. */
bool need_vertical_update(size_t old_pww)
{
return
#ifndef NANO_SMALL