[vim/vim] Patch 9.2.0898 broke :hardcopy, adds extra space between lines (Issue #21203)

17 views
Skip to first unread message

Gary Johnson

unread,
Sep 1, 2026, 1:35:46 AM (yesterday) Sep 1
to vim/vim, Subscribed
ghgary created an issue (vim/vim#21203)

Steps to reproduce

  1. Start vim as:
    vim --clean
  2. Enter a few lines of text, each consisting of a vertical bar (ASCII 0x7C) in the first column.
  3. Execute:
    :hardcopy
  4. Observe that the bars are separated vertically by about 3/64" and the pitch is about 6.5 lines per inch.

Expected behaviour

In all previous versions of Vim that I have used, including patch 9.2.0897 and 9.1.697 (/usr/bin/vim on Ubuntu 24.04), the vertical bars on adjacent lines touch each other and the pitch is a little more than 7 lines per inch. As another way of looking at the pitch, the number of lines per page used to be 69. This bug has reduced that number to 56 lines per page.

Version of Vim

9.2.0898 Built with "make distclean; make -j12", so no custom configuration.

Environment

Operating system: Ubuntu 24.04
Terminal: XTerm(403)
Value of $TERM: xterm-256color
Shell: bash 5.2.21

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21203@github.com>

Christian Brabandt

unread,
Sep 1, 2026, 3:38:36 AM (yesterday) Sep 1
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21203)

ping @64-bitman


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21203/5490559604@github.com>

Foxe Chen

unread,
Sep 1, 2026, 9:02:05 AM (yesterday) Sep 1
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#21203)

Can you show output of :version?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21203/5494330462@github.com>

Foxe Chen

unread,
Sep 1, 2026, 9:58:30 AM (yesterday) Sep 1
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#21203)

This seems to mostly be a font issue, because the Pango hardcopy backend uses Courier New 10 as the default font, while postscript uses the plain Courier font.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21203/5495087091@github.com>

Gary Johnson

unread,
Sep 1, 2026, 3:27:37 PM (yesterday) Sep 1
to vim/vim, Subscribed
ghgary left a comment (vim/vim#21203)

Here is the output of vim --version.

VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Sep  1 2026 11:58:40)
Included patches: 1-1015
Compiled by gary@epicurus
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl                +float              +mouse_urxvt        +tag_binary
+arabic             +folding            +mouse_xterm        -tag_old_static
+autochdir          -footer             +mouseshape         -tcl
+autocmd            +fork()             +multi_byte         +termguicolors
-autoservername     +gettext            +multi_lang         +terminal
+balloon_eval       -hangul_input       -mzscheme           +terminfo
+balloon_eval_term  +iconv              +netbeans_intg      +termresponse
+browse             +image              +num64              +textobjects
++builtin_terms     +image_cairo        +packages           +textprop
+byte_offset        -image_gdi          +pango              +timers
+channel            -image_gdk          +path_extra         +title
+cindent            +image_kitty        -perl               +toolbar
+clientserver       +image_sixel        +persistent_undo    +user_commands
+clipboard          +insert_expand      +popupwin           +vartabs
+clipboard_provider +ipv6               -postscript         +vertsplit
+cmdline_compl      +job                +printer            +vim9script
+cmdline_hist       +jumplist           +profile            +viminfo
+cmdline_info       +keymap             -python             +virtualedit
+comments           +lambda             -python3            +visual
+conceal            +langmap            +quickfix           +visualextra
+cryptv             +libcall            +reltime            +vreplace
+cscope             +linebreak          +rightleft          +wayland
+cursorbind         +lispindent         -ruby               +wayland_clipboard
+cursorshape        +listcmds           +scrollbind         +wildignore
+dialog_con_gui     +localmap           +signs              +wildmenu
+diff               -lua                +smartindent        +windows
+digraphs           +menu               +socketserver       +writebackup
+dnd                +mksession          +sodium             +X11
-ebcdic             +modify_fname       +sound              +xattr
+emacs_tags         +mouse              +spell              -xfontset
+eval               +mouse_dec          +startuptime        +xim
+ex_extra           +mouse_gpm          +statusline         +xpm
+extra_search       -mouse_jsbterm      -sun_workshop       +xsmp_interact
-farsi              +mouse_netterm      +syntax             +xterm_clipboard
+file_in_path       +mouse_sgr          +tabpanel           -xterm_save
+find_in_path       -mouse_sysmouse     -tag_any_white      
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
 3rd user vimrc file: "~/.config/vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
3rd user gvimrc file: "~/.config/vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lwayland-client -lcairo -lz -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lcairo -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lcanberra -lsodium -lacl -lattr -lgpm 

I don't know what the font is. I suppose it is whatever Vim chooses as the default. It looks like some flavor of Courier.

The printer is an HP ENVY Photo 7155, if that matters.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21203/5499235946@github.com>

Christian Brabandt

unread,
Sep 1, 2026, 4:48:38 PM (yesterday) Sep 1
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#21203)

It has +pango, so a quick fix should be to disable pango using ./configure --disable-hardcopy-pango Or please try patch v9.2.1030, which includes @64-bitman changes (using a different font and reducing the character-height), thanks!.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21203/5500222433@github.com>

Gary Johnson

unread,
Sep 1, 2026, 6:49:55 PM (yesterday) Sep 1
to vim/vim, Subscribed
ghgary left a comment (vim/vim#21203)

Both the quick fix and the patch fix the problem for me. Thank you! That was fast!


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21203/5501465989@github.com>

Reply all
Reply to author
Forward
0 new messages