Macos – iTerm2 fullscreen causes an empty line at the bottom

fullscreeniterm2macosterminalterminal-emulator

When I fullscreen an iTerm2 window, an empty line appears at the bottom of the terminal window. How do I get rid of it?

Compare these two screenshots:

Windowed (appears as expected)
Windowed (appears as expected)

Fullscreen (empty line appears at bottom)
Fullscreen (empty line appears at bottom)

I had enabled the Use Lion-style Fullscreen windows setting,

iTerm > Preferences > General > Window > Use Lion-style Fullscreen windows

so I tried disabling it. That appeared to resolve the problem–fullscreening a window after disabling this feature looked good, no extra line. But then after I switched applications using Command-Tab a few times, the extra line suddenly appeared. What's happening?!

Is this a bug? How do I prevent this from happening?


Solution:
The accepted answer helped me to get rid of the extra line. I changed the font size in my iTerm2 profile settings to 16pt Monaco from 18pt Monaco. Here is a screenshot:

No extra line after switching font size

Best Answer

See this answer, excerpted below. It was written about gnome-terminal, but it's the same for iTerm:

Terminal emulators work with a grid of cells: a whole number of cells both horizontally and vertically. That's why when you resize the window by dragging its corner, it resizes in unusually large steps rather than pixels. [...]

In fullscreen mode, gnome-terminal is forced to a size that's not a multiple of the size of its character cells. Utilities and applications running inside terminals have no notion of such partial cells and couldn't draw in the remaining area, it just doesn't exist for them.

You might want to experiment with different font sizes, you might find one where an integer number of cells just fit (or at least the gap is not that large)

Related Question