Package: ranger
Version: 1.9.4-2.1
Followup-For: Bug #1128304
X-Debbugs-Cc: [email protected]

This is still present in 1.9.4-2.1. Until the fix is packaged, here is a 
workaround that leaves the package untouched.

Save this as ~/.config/ranger/plugins/fix_endwin.py:

    import ranger.gui.ui

    _initialize = ranger.gui.ui.UI.initialize

    def initialize(self):
        _initialize(self)
        self.win.refresh()

    ranger.gui.ui.UI.initialize = initialize

ranger imports every Python file in that directory at startup, see PLUGINS in 
ranger(1). The plugin refreshes the window every time the UI is resumed, so the 
next endwin() no longer fails. That is what the upstream fix does inside 
UI.initialize() itself:

    
https://github.com/ranger/ranger/commit/7b0245d5daef80bd91d8e3b703be8b8ec578014b

With the plugin in place, :bulkrename gets through both editor runs and renames 
the files. The file can be deleted once a fixed ranger is installed.

-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 7.2.12+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ranger depends on:
ii  python3         3.14.7-3
ii  sensible-utils  0.0.26

Versions of packages ranger recommends:
ii  file             1:5.47-4
ii  less             710+really668-1
ii  python3-chardet  5.2.0+dfsg-2
ii  w3m-img          0.5.3+git20230121-2.3

Versions of packages ranger suggests:
pn  atool                 <none>
pn  caca-utils            <none>
ii  lynx                  2.9.3-2
pn  mediainfo | exiftool  <none>
ii  mupdf-tools           1.28.2+ds1-2+b2
ii  poppler-utils         26.07.0-4
ii  python3-pygments      2.20.0+dfsg-2
ii  sudo                  1.9.17p2-11
pn  unoconv               <none>
ii  w3m                   0.5.3+git20230121-2.3

-- no debconf information

Reply via email to