8000 GitHub - RJSent/mini-ontop.el: Prevent windows from jumping on minibuffer activation
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

RJSent/mini-ontop.el

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

mini-ontop.el

Introduction

mini-ontop is a small Emacs package that prevents the “jump” or recentering of the main editing window whenever a multi-line minibuffer (for instance from icomplete-vertical-mode) is triggered. By automatically adjusting point just enough before showing the minibuffer, Emacs won’t force the screen to scroll.

This solves a common annoyance where pressing M-x or any other command that opens a multi-line minibuffer can cause your main window to jump up a few lines or flicker.

No special configuration is required—just enable mini-ontop-mode and enjoy a calmer editing experience.

./mini-ontop.gif

Installation

(use-package mini-ontop
  :ensure t
  :config (mini-ontop-mode 1))

Customization

• mini-ontop-lines: By default, mini-ontop-lines attempts to compute a reasonable estimate based on Emacs’ max-mini-window-height. However, your setup might need fine-tuning. If you still see jumps/flicker, try increasing mini-ontop-lines. • mini-ontop-ignore-predicates: A list of zero-argument functions (predicates). If any of these functions returns non-nil, mini-ontop will skip moving the point up for that particular window/buffer combination. This is useful for ignoring certain modes or commands (e.g., if you want to disable the behavior while using ivy-yasnippet or other special minibuffer-driven workflows). Example usage:

(add-to-list ’mini-ontop-ignore-predicates (lambda () (bound-and-true-p ivy-yasnippet–active)))

These two options give you the flexibility to fine-tune mini-ontop so that it “just works” in your environment, while still respecting any special cases.

Contributing

  1. Fork the repository on GitHub.
  2. Create a feature branch for your changes.
  3. Open a Pull Request describing your modifications or improvements.

Bugs, suggestions, and other feedback are welcome via the GitHub issue tracker.

License

mini-ontop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

mini-ontop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Emacs. If not, see https://www.gnu.org/licenses/.

About

Prevent windows from jumping on minibuffer activation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
2CD6

Languages

  • Emacs Lisp 100.0%
0