Skip to content
ivanbokhan84Public
forked from lapce/lapce

About

Fork of Lapce with terminal fixes for Windows: scrolling that redraws, Ctrl+V and right-click paste, and a terminal panel that can dock to the right

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Lapce — Windows terminal fixes

A fork of Lapce that makes the built-in terminal usable on Windows


Lapce (IPA: /læps/) is a lightning-fast code editor written in pure Rust, with a UI in Floem. This fork keeps everything Lapce does and fixes the parts of its integrated terminal that get in the way on Windows: scrolling that appeared to do nothing, and a terminal that ignored both Ctrl+V and the right mouse button.

Maintained by Ivan Bokhan, on top of Lapce v0.4.6 by Dongdong Zhou and the Lapce contributors — see Credits.

Changes from upstream

All changes are confined to the terminal panel. Modified files: lapce-app/src/terminal/data.rs, lapce-app/src/panel/terminal_view.rs, lapce-app/src/command.rs, lapce-app/src/window_tab.rs, defaults/keymaps-nonmacos.toml.

Scrolling actually redraws

Scrolling the terminal — mouse wheel, PageUp/PageDown — mutates the alacritty grid behind a RwLock, which does not notify the reactive system. The display offset moved, but nothing was repainted until some unrelated event triggered a paint, so scrolling looked broken. Each scroll now sends TermNotification::RequestPaint, the same way terminal output already does.

Related upstream reports: #2040, #1654.

Paste with Ctrl+V and the right mouse button

Upstream binds paste in the terminal to Ctrl+Shift+V only, and the right mouse button does nothing unless the terminal is running a run/debug task.

  • right click pastes, the way cmd.exe and PuTTY do
  • Shift+right click opens the context menu
  • Ctrl+V is bound to clipboard_paste in terminal mode out of the box (in defaults/keymaps-nonmacos.toml, so Windows and Linux; macOS keeps its own Cmd+V binding)

The terminal panel can dock to the right

Lapce can already move a panel between dock positions, but only by dragging its icon. This fork adds explicit commands, available from the palette (Ctrl+Shift+P) and from the terminal's context menu:

Command What it does
move_terminal_panel_to_bottom Dock the terminal panel at the bottom
move_terminal_panel_to_right Dock the terminal panel on the right
toggle_terminal_panel_position Flip between the two

Bind one of them in keymaps.toml to switch with a single keystroke:

[[keymaps]]
key = "ctrl+shift+t"
command = "toggle_terminal_panel_position"

Building

Requires a Rust toolchain and, on Windows, the MSVC build tools:

git clone https://github.com/ivanbokhan84/lapce.git
cd lapce
cargo build --release

The binary lands in target/release/lapce.exe. To use it alongside an existing installation, rename the installed lapce.exe — Windows allows renaming a running executable — and copy the new one in its place.

Build instructions for other platforms are in docs/building-from-source.md.

Credits

Lapce is created by Dongdong Zhou and the Lapce contributors. Everything this fork does rests on their work. The upstream README lives at lapce/lapce, user documentation at docs.lapce.dev, and the community is on the Discord server.

License

Apache License Version 2.0, unchanged from upstream. You may use the code as you please as long as you adhere to its conditions — see LICENSE.

About

Fork of Lapce with terminal fixes for Windows: scrolling that redraws, Ctrl+V and right-click paste, and a terminal panel that can dock to the right

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages