summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui.c13
-rw-r--r--src/os_win32.c3
2 files changed, 15 insertions, 1 deletions
diff --git a/src/gui.c b/src/gui.c
index c2942ee48..c086de037 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3203,7 +3203,11 @@ gui_init_which_components(oldval)
using_tabline = gui_has_tabline();
if (!gui_mch_showing_tabline() != !using_tabline)
{
+ /* We don't want a resize event change "Rows" here, save and
+ * restore it. Resizing is handled below. */
+ i = Rows;
gui_update_tabline();
+ Rows = i;
need_set_size = TRUE;
if (using_tabline)
fix_size = TRUE;
@@ -3354,12 +3358,19 @@ gui_has_tabline()
gui_update_tabline()
{
int showit = gui_has_tabline();
+ int shown = gui_mch_showing_tabline();
if (!gui.starting && starting == 0)
{
- gui_mch_show_tabline(showit);
+ if (!showit != !shown)
+ gui_mch_show_tabline(showit);
if (showit != 0)
gui_mch_update_tabline();
+
+ /* When the tabs change from hidden to shown or from shown to
+ * hidden the size of the text area should remain the same. */
+ if (!showit != !shown)
+ gui_set_shellsize(FALSE, showit);
}
}
diff --git a/src/os_win32.c b/src/os_win32.c
index 330ce5a57..a2b2c5059 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -548,6 +548,8 @@ static const struct
#ifdef _MSC_VER
// The ToAscii bug destroys several registers. Need to turn off optimization
// or the GetConsoleKeyboardLayoutName hack will fail in non-debug versions
+# pragma warning(push)
+# pragma warning(disable: 4748)
# pragma optimize("", off)
#endif
@@ -619,6 +621,7 @@ win32_kbd_patch_key(
/* MUST switch optimization on again here, otherwise a call to
* decode_key_event() may crash (e.g. when hitting caps-lock) */
# pragma optimize("", on)
+# pragma warning(pop)
# if (_MSC_VER < 1100)
/* MUST turn off global optimisation for this next function, or