Skip to content

Clear error messages after a command runs successfully - #2117

Merged
joelim-work merged 4 commits into
gokcehan:masterfrom
joelim-work:clearmsg
Aug 26, 2025
Merged

Clear error messages after a command runs successfully#2117
joelim-work merged 4 commits into
gokcehan:masterfrom
joelim-work:clearmsg

Conversation

@joelim-work

@joelim-work joelim-work commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

From suggestion in #2021 (comment)

  • Rename loadFileInfo() to drawStat() to match drawRuler() and move away from the idea of loading file information

Currently the app.ui.loadFileInfo function is used calculate the file stat information, which is read when drawing the ruler. This function is supposed to be called when a new file is selected, but there are many times when this is called simply to clear error messages when a command runs successfully.

This PR changes ui.msg to store only messages (i.e. error messages generated internally or from the echo/echomsg/echoerr commands), decoupling it from the file stat information, which will now be calculated on-demand when drawing the ruler. If there is a message, then it will be shown without calculating the file stat information at all.

Also, most commands are interactive and should clear error messages after being executed. There are a few commands like invert/unselect/tag-toggle which should do this, and is fixed as part of this change.

@joelim-work joelim-work added the fix Pull requests that fix existing behavior label Aug 26, 2025
@joelim-work joelim-work added this to the r38 milestone Aug 26, 2025
@joelim-work
joelim-work merged commit 8150586 into gokcehan:master Aug 26, 2025
4 checks passed
@joelim-work
joelim-work deleted the clearmsg branch August 26, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests that fix existing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant