MacOS – How did I set this annoying window margin on MacOS app and how to remove it

itermmacoswindow-manager

Some time ago I pressed a weird key combination that seemed to add a margin to the top and bottom of active application window (in this case, iTerm2). See screenshot below:

enter image description here

It doesn't happen on any other apps. Just this one, so it is like the OS or Window manager has remembered this setting for this specific app.

I have no idea what the key combination was or how to remove this margin. It's very infuriating.

I use Spectacle to resize/re-position windows so I suspected it may be related to this app but it has no mention of being able to create window margins.

Any ideas? Perhaps someone knows where the OS stores application-specific window properties?

Best Answer

I eventually figured this out and the cause is specific to iTerm2 rather than MacOS.

There is an advanced setting in iTerm2 called "Terminal Windows Resize Smoothly" which when set to "No" forces the terminal window size to snap to the current font grid. This is what caused the margin and prevented me from resizing to remove the margin. Setting this to "Yes" or holding CTRL when resizing the iTerm2 window allows the window to resize to any size rather than snap to grid.

Hooray!

iTerm2 Advanced Preferences