Comments (2)
I'm not sure what @IceDragon200 did to trigger the panic, but here's a backtrace I got from a similar issue...
To reproduce:
- make terminal window really small (like 10x10)
- enter command prompt by typing:
:
Root cause: division by zero in prompt.rs line 118.
let max_col = area.width / BASE_WIDTH;
let height = ((self.completion.len() as u16 + max_col - 1) / max_col);
In the above area.width = 16
and BASE_WIDTH
is hard coded to 30, causing max_col
to be zero.
Looks like the command prompt doesn't handle terminal window size correctly, issue #54 was a very similar bug related to BASE_WIDTH
and terminal size.
#1 0x0000555556353f54 in std::panicking::rust_panic_with_hook ()
at library/std/src/panicking.rs:610
#2 0x0000555556353a67 in std::panicking::begin_panic_handler::{{closure}} ()
at library/std/src/panicking.rs:495
#3 0x0000555556351a3c in std::sys_common::backtrace::__rust_end_short_backtrace<closure-0,!> () at library/std/src/sys_common/backtrace.rs:141
#4 0x00005555563539f9 in std::panicking::begin_panic_handler ()
at library/std/src/panicking.rs:493
#5 0x00005555556dbdd1 in core::panicking::panic_fmt ()
at library/core/src/panicking.rs:92
#6 0x00005555556dbd1d in core::panicking::panic () at library/core/src/panicking.rs:50
#7 0x0000555555896ed5 in hx::ui::prompt::Prompt::render_prompt (self=0x555557626b50,
area=..., surface=0x7fffffffbec0, cx=0x7fffffff9c88)
at helix-term/src/ui/prompt.rs:118
#8 0x0000555555897706 in hx::ui::prompt::{{impl}}::render (self=0x555557626b50,
area=..., surface=0x7fffffffbec0, cx=0x7fffffff9c88)
at helix-term/src/ui/prompt.rs:273
#9 0x00005555557386de in hx::compositor::Compositor::render (self=0x7fffffffbea0,
cx=0x7fffffff9c88) at helix-term/src/compositor.rs:137
#10 0x00005555557d58ec in hx::application::Application::render (self=0x7fffffffbea0)
at helix-term/src/application.rs:79
#11 0x00005555557d704d in hx::application::Application::handle_terminal_events (
self=0x7fffffffbea0, event=...) at helix-term/src/application.rs:138
#12 0x00005555557d6679 in hx::application::{{impl}}::event_loop::{{closure}} ()
at helix-term/src/application.rs:96
#13 0x000055555571e76b in core::future::from_generator::{{impl}}::poll (
self=..., cx=0x7fffffffbe18)
at /home/rsalminen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
#14 0x00005555557d904f in hx::application::{{impl}}::run::{{closure}} ()
at helix-term/src/application.rs:254
#15 0x000055555571e159 in core::future::from_generator::{{impl}}::poll (
self=..., cx=0x7fffffffbe18)
at /home/rsalminen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
#16 0x00005555557dbee7 in hx::main::{{closure}} () at helix-term/src/main.rs:169
#17 0x000055555571d7f9 in core::future::from_generator::{{impl}}::poll (
self=..., cx=0x7fffffffbe18)
at /home/rsalminen/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
#18 0x00005555558b4060 in tokio::park::thread::{{impl}}::block_on::{{closure}}<core::future::from_generator::GenFuture> ()
at /home/rsalminen/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.6.1/src/park/thread.rs:263
from helix.
Fixed by #121
from helix.
Related Issues (20)
- Add normal mode shortcuts to insert mode HOT 1
- Suspended will iterm2's key binding invalid HOT 1
- Consider update from old Lua grammar HOT 3
- golangci-lint-langserver not working with workspace diagnostics
- C/C++: replace dot operator with arrow operator intelligently HOT 3
- Documentation suggestions from new user
- Scroll jank HOT 3
- -
- Trust zones for project root discovery
- Syntax highlighting color changes on scroll HOT 1
- split_selection_on_newlines selects following line too HOT 1
- edition.preview-completion-insert = false produces unexpected autocompletions HOT 2
- Support "plus" key HOT 2
- `half_page_up`/`half_page_down` does not work when combined with `align_view_center` HOT 3
- Wrap long lines in diagnostic picker HOT 2
- Some Pyright diagnostics (diagnostic-severity: hint) not displaying HOT 1
- HTML Element Highlighting doesn't work in PHP files HOT 2
- LSP Error in Lua HOT 1
- OCaml comment highlight is broken HOT 4
- Aggressive editor.scrolloff causes infinite loop HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helix.