Commit: patch 9.2.0943: test: test_hardcopy fails on GTK4 UI

Christian Brabandt <[email protected]> Tue, 11 Aug 2026 22:00:03 +0200
Newsgroups gmane.editors.vim.devel
Message-ID <[email protected]>
patch 9.2.0943: test: test_hardcopy fails on GTK4 UI

Commit: https://github.com/vim/vim/commit/59a4bab99f7943eef017a3dda858b08caa4082c7
Author: Foxe Chen <[email protected]>
Date:   Tue Aug 11 19:42:18 2026 +0000

    patch 9.2.0943: test: test_hardcopy fails on GTK4 UI
    
    Problem:  test: test_hardcopy fails on GTK4 UI, because it opens a
              dialog
    Solution: Use :hardcopy! to skip the dialog, set GDK_DEBUG=no-portals
              environment variable (Foxe Chen)
    
    closes: #21009
    
    Signed-off-by: Foxe Chen <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml
index e91a267ac..57e197a61 100644
--- a/.github/workflows/ci-linux.yml
+++ b/.github/workflows/ci-linux.yml
@@ -29,6 +29,7 @@ jobs:
       DISPLAY: ":99"
       WAYLAND_DISPLAY: "/tmp/weston_sock"
       GTK_A11Y: "none"
+      GDK_DEBUG: "no-portals"
       DEBIAN_FRONTEND: noninteractive
 
     strategy:
diff --git a/.github/workflows/ci-linux_asan.yml b/.github/workflows/ci-linux_asan.yml
index cbba1c05a..2b92ba1b2 100644
--- a/.github/workflows/ci-linux_asan.yml
+++ b/.github/workflows/ci-linux_asan.yml
@@ -27,6 +27,7 @@ jobs:
       DISPLAY: ":99"
       WAYLAND_DISPLAY: "/tmp/weston_sock"
       GTK_A11Y: "none"
+      GDK_DEBUG: "no-portals"
       DEBIAN_FRONTEND: noninteractive
 
     strategy:
diff --git a/src/testdir/test_hardcopy.vim b/src/testdir/test_hardcopy.vim
index 62065139c..94a252637 100644
--- a/src/testdir/test_hardcopy.vim
+++ b/src/testdir/test_hardcopy.vim
@@ -118,7 +118,7 @@ func Test_printexpr()
   set printexpr=PrintFile(v:fname_in)
 
   help help
-  hardcopy dummy args
+  hardcopy! dummy args
   call assert_equal(['Test printexpr: dummy args'],
   \                 readfile('Xhardcopy_printexpr'))
   call delete('Xhardcopy_printexpr')
@@ -129,7 +129,7 @@ func Test_printexpr()
     return 1
   endfunc
   set printexpr=PrintFails(v:fname_in)
-  call assert_fails('hardcopy', 'E365:')
+  call assert_fails('hardcopy!', 'E365:')
 
   " Using a script-local function
   func s:NewPrintExpr()
@@ -175,7 +175,7 @@ func Test_empty_buffer()
   HasPostscript
 
   new
-  call assert_equal("
No text to be printed", execute('hardcopy'))
+  call assert_equal("
No text to be printed", execute('hardcopy!'))
   bwipe
 endfunc
 
diff --git a/src/version.c b/src/version.c
index ee33eafee..320a46c3f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    943,
 /**/
     942,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wtsdn-007cmG-Sk%40256bit.org.