1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

Merge pull request #955 from ailin-nemui/split-width-bug

fix and document window width on screen width dependency
This commit is contained in:
ailin-nemui 2018-10-05 10:49:50 +02:00 committed by GitHub
commit cee9d09deb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -252,9 +252,9 @@ MAIN_WINDOW_REC *mainwindow_create(int right)
}
g_slist_free(line);
} else {
if (MAIN_WINDOW_TEXT_WIDTH(parent) <
2* NEW_WINDOW_WIDTH)
if (MAIN_WINDOW_TEXT_WIDTH(parent) < 2 * NEW_WINDOW_WIDTH) {
parent = find_window_with_room_right();
}
if (parent == NULL)
return NULL; /* not enough space */

View File

@ -5,7 +5,7 @@
#include "term.h"
#define WINDOW_MIN_SIZE 2
#define NEW_WINDOW_WIDTH 10
#define NEW_WINDOW_WIDTH 20 /* must be >= MIN_SCREEN_WIDTH defined in term.c */
#define MAIN_WINDOW_TEXT_HEIGHT(window) \
((window)->height-(window)->statusbar_lines)