7

Each time I open and close new tab in Terminal app, the size of window "shrinks" by one line, until it reaches 5 lines, where it stops shrinking at last.

I can literally keep repeating sequence +T and +W to reproduce this any time.

I have tried changing Terminal settings, font family and font size, but nothing helped. Is there anything that can be done to prevent this?

Note: this question is not a duplicate of Opening tab in Terminal resizes window.

FurloSK
  • 431

3 Answers3

10

The solution is to turn on setting to always show tab bar, even if only one tab is open in window:

  • in top bar, go to ViewShow Tab Bar,
  • or use keyboard shortcut ++T.

This is just a workaround I have found on this site to a bug that is present in Terminal app at least since 2009. So far this is the only solution that was working for me consistently on every OS X installation.

FurloSK
  • 431
  • 1
    As of macOS High Sierra (10.13.4), this still remains an issue. Even with this solution applied, Terminal window will shrink at least a little bit when fully stretched vertically (hidden Dock). – Felicio May 17 '18 at 19:43
  • Unfortunately, for splitting pane this solution falls short too. – Felicio May 17 '18 at 20:33
  • I don't have this option on Windows. – aderchox Nov 19 '22 at 07:46
  • 1
    @aderchox what do you mean "on Windows"? This is a macOS-related question and you are on a site dedicated to Apple-related problems – FurloSK Nov 21 '22 at 12:33
  • @FurloSK Oh thank you, I was searching for just the exact same thing for VSCode. – aderchox Nov 22 '22 at 06:37
  • In iTerm2 you accomplish that with Preferences -> Appearance -> Tabs -> Either of the first 2 options should work – A Campos Dec 13 '23 at 20:06
1
  1. Window > Save Windows as Group...
  2. Preferences > General > On startup, open : Window group, select the item that you just saved.

after these actions, the Terminal could keep window size, but if you open a new terminal window, you will get a default window size of it, finish follow steps to work out it:

  1. Preferences > General > New windows open with: Same profile
  2. Preferences > General > New tabs open with: Same profile

Done.

it works on macos 12.5

enter image description here

ibamboo
  • 111
1

I'm using the version 3.4.16 and I found the following option to always show the tab bar:

Iterm preferences

This solves the problem described in the question.

  • 1
    Does this solve the problem described in the question? – nohillside Aug 23 '22 at 09:56
  • Yes, it does, because the terminal window, by default, changes its size when you have goes from 1 to 2 tabs because it starts to shows this "tab bar". With this option checked, it will always show the tab bar and the size will not change anymore. – Fabio Perrella Aug 24 '22 at 11:42
  • Maybe you should add that to the answer. Currently it reads like the answer to a "how can I force the tab bar to show always" question. – nohillside Aug 24 '22 at 12:07
  • What version of macOS is this? It would help more than stating version of Terminal app. As far as I understand, your answer is the same as mine, just the place where the setting (to always show tab bar) is located has changed. I can add this to my answer if you give me the macOS version. – FurloSK Sep 03 '22 at 15:39
  • I'm running 12.5.1 – Fabio Perrella Sep 04 '22 at 18:34
  • I believe @FabioPerrella is sharing the settings for iTerm, not Terminal. His preference tabs match those as documented by the iTerm site: https://iterm2.com/documentation-preferences.html

    Meanwhile, the version of Terminal in Sonoma 14.0 is 2.14.

    – Luke Abel Oct 31 '23 at 16:17