Skip to content

[201_94] Disable command mode autocomplete suggestions in macro editor#2953

Open
1sh-repalto wants to merge 5 commits intoMoganLab:mainfrom
1sh-repalto:1sh-repalto/201_86/disable_macro_editor_autocomplete
Open

[201_94] Disable command mode autocomplete suggestions in macro editor#2953
1sh-repalto wants to merge 5 commits intoMoganLab:mainfrom
1sh-repalto:1sh-repalto/201_86/disable_macro_editor_autocomplete

Conversation

@1sh-repalto
Copy link
Contributor

Fixes #2873
In the macro editor, the autocomplete option for command mode \ should be disabled.

Summary

Disabled autocomplete suggestions in the macro editor when in command mode \.

Issue Found

When editing macros in the macro editor, autocomplete suggestions would trigger when command mode (\) is entered.

Changes

In src/Edit/Interface/edit_source.cpp added checks to detect and skip autocomplete in macro editor buffers:

  // Disable autocomplete in the macro editor
  string buf_name= as_string (buf->buf->name);
  if ((starts(buf_name, "tmfs://aux/edit-") 
    && buf_name != "tmfs://aux/edit-comment"
    && buf_name != "tmfs://aux/edit-shortcuts")
    || buf_name == "tmfs://aux/macro-editor"
  ) {
    return;
  }

How to test

  1. Open Mogan Editor.
  2. Open the macro editor:
    • Via Tools → Macros → New Macro or Edit Macros
  3. Test with command mode:
    • In macro editor, try entering command symbols like \
    • Verify: No unwanted completions interfere but macros still work
macro_editor.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

宏编辑器中应该禁用命令模式 \ 的补全选项

1 participant