Skip to content

Disable undo menu item when there is no more history available #55440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mjbvz opened this issue Jul 31, 2018 · 8 comments
Open

Disable undo menu item when there is no more history available #55440

mjbvz opened this issue Jul 31, 2018 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality menus Menu items and widget issues undo-redo Issues around undo/redo
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Jul 31, 2018

From #55389

Feature request
Disable the undo menu item if there is no undo history available.

(same for redo if there is no more forward history)

@sbatten sbatten added feature-request Request for new features or functionality workbench-menu labels Jul 31, 2018
@bpasero
Copy link
Member

bpasero commented Aug 6, 2018

Shouldn't the editor provide this a as a context key @alexandrudima ?

@alexdima
Copy link
Member

alexdima commented Aug 6, 2018

This is blocked by #55453, currently the global context is evaluated when computing the enablement/disablement of extensions.

@bpasero bpasero removed their assignment Aug 6, 2018
@sbatten sbatten added this to the On Deck milestone Sep 10, 2018
@sbatten sbatten added menus Menu items and widget issues and removed workbench-menu labels Oct 7, 2019
@sbatten
Copy link
Member

sbatten commented Oct 10, 2019

we would need an activeEditorCanUndo key much like activeEditorCanSave

@alexdima alexdima modified the milestones: On Deck, Backlog Oct 10, 2019
@alexdima alexdima removed their assignment Oct 10, 2019
@kanlukasz
Copy link

Definitely a very, very important function.
We need to know if there is something to undo or repeat. Sometimes it's very important

Examples from other editors:

N++ - no redo

obraz

N++ - no undo

obraz

ST3 - no undo

obraz

ST3 - no redo

obraz

I keep my fingers crossed for it

@kanlukasz
Copy link

Is that still blocked by #55453 ?
I ask because #55453 is closed

@sbatten
Copy link
Member

sbatten commented Jul 20, 2020

@alexdima I know undo state has been modified recently, any changes that would help here?

@alexdima
Copy link
Member

@sbatten Yes, the undo redo service can be queried based on the current focused editor and asked if there is anything to undo or to redo. But this still depends on focus, so we would need to have a global context key that updates every time focus is changed.

@psnet
Copy link

psnet commented May 30, 2023

Any movement?.. 2023 is now. Sometimes this is must, and it still appears unresolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality menus Menu items and widget issues undo-redo Issues around undo/redo
Projects
None yet
Development

No branches or pull requests

6 participants