Renaming 'no_more_space()' to 'more_space()' for consistency.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4985 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-06-19 11:58:11 +00:00
parent a81e141326
commit e7c690d577
3 changed files with 13 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2014-06-19 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (window_init): Rename 'no_more_space()' to 'more_space()'
for consistency, and tweak the related comments.
2014-06-18 Benno Schulenberg <bensberg@justemail.net>
* src/text.c: Rename 'to_end' to 'to_eof', to lessen confusion
with CUT_TO_END (which is about cutting to end-of-line).

View File

@ -734,7 +734,7 @@ void die_save_file(const char *die_filename
void window_init(void)
{
/* If the screen height is too small, get out. */
editwinrows = LINES - 5 + no_more_space() + no_help();
editwinrows = LINES - 5 + more_space() + no_help();
if (COLS < MIN_EDITOR_COLS || editwinrows < MIN_EDITOR_ROWS)
die(_("Window size is too small for nano...\n"));
@ -755,10 +755,10 @@ void window_init(void)
delwin(bottomwin);
/* Set up the windows. */
topwin = newwin(2 - no_more_space(), COLS, 0, 0);
edit = newwin(editwinrows, COLS, 2 - no_more_space(), 0);
topwin = newwin(2 - more_space(), COLS, 0, 0);
edit = newwin(editwinrows, COLS, 2 - more_space(), 0);
bottomwin = newwin(3 - no_help(), COLS, editwinrows + (2 -
no_more_space()), 0);
more_space()), 0);
/* Turn the keypad on for the windows, if necessary. */
if (!ISSET(REBIND_KEYPAD)) {
@ -1063,16 +1063,15 @@ void version(void)
}
/* Return 1 if the MORE_SPACE flag is set, and 0 otherwise. This is
* used to calculate the relative screen position while taking this flag
* into account, since it adds one line to the edit window. */
int no_more_space(void)
* used to calculate the sizes and Y coordinates of the subwindows. */
int more_space(void)
{
return ISSET(MORE_SPACE) ? 1 : 0;
}
/* Return 2 if the NO_HELP flag is set, and 0 otherwise. This is used
* to calculate the relative screen position while taking this flag into
* account, since it removes two lines from the edit window. */
* to calculate the sizes and Y coordinates of the subwindows, because
* having NO_HELP adds two lines to the edit window. */
int no_help(void)
{
return ISSET(NO_HELP) ? 2 : 0;

View File

@ -454,7 +454,7 @@ void print_opt_full(const char *shortflag
, const char *desc);
void usage(void);
void version(void);
int no_more_space(void);
int more_space(void);
int no_help(void);
void nano_disabled_msg(void);
void do_exit(void);