Skip to content

Glow scroll position resets after file save when using lite-xl in Niri #841

@ubuangel

Description

@ubuangel

When editing and saving a Markdown file in lite‑xl while viewing it in glow (TUI) inside the Niri compositor, glow automatically refreshes but the scroll position jumps several lines upward. This forces the user to manually scroll back to the previous location. The issue does not occur when using the micro editor, where glow refreshes and correctly maintains the current position.

Setup
Please complete the following information along with version numbers, if applicable.

  • OS Arch
  • Shell bash
  • Terminal Emulator alacritty

To Reproduce

Steps to reproduce the behavior:

  1. Run glow inside a compositor such as Niri.
  2. Open a Markdown file in lite-xl for editing.
  3. Keep another window open with glow (TUI) displaying the same file.
  4. Edit and save the file in lite-xl.
  5. Notice that glow refreshes automatically, but the cursor/scroll position jumps several lines upward.

Expected behavior

Glow should keep the current position in the file after refreshing, without requiring manual scrolling again.

Additional context

  • When testing with the micro editor, the behavior works correctly: glow refreshes and maintains the position.
  • The issue occurs specifically when using lite-xl as the editor in combination with glow inside Niri.

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions