Skip to content
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

remove 'f' and 't' motions #16

Closed
alexherbo2 opened this issue Jan 3, 2014 · 2 comments
Closed

remove 'f' and 't' motions #16

alexherbo2 opened this issue Jan 3, 2014 · 2 comments
Assignees

Comments

@alexherbo2
Copy link
Contributor

f and t motions can be replaced with <limit>/<characters> then H or L motions if needed.

When providing a count with /, set the maximum allowed length of the user input to <limit> characters. Kakoune will automatically issue the command when the user input reaches that length.

@ghost ghost assigned mawww Jan 3, 2014
@mawww
Copy link
Owner

mawww commented Jan 26, 2014

After our discussions on IRC, and seeing my own usage patterns, I believe f and t motions are important shortcuts, in particular to go to a char that might have a regex meaning. I intend to keep them for the time being.

@mawww mawww closed this as completed Jan 26, 2014
@alexherbo2
Copy link
Contributor Author

How about 3/\Q<character>?

map global normal f 3/\Q
map global normal t 3/\Q

krobelus added a commit to krobelus/kakoune that referenced this issue Mar 18, 2023
When Kakoune's terminal is shown on my laptop monitor and I plug
in my external monitor, the terminal's workspace will move to that
external monitor. When this happens, Kakoune may segfault.
There are multiple resize events (SIGWINCH) in quick succession;
it crashes because we handle SIGWINCH during rendering.

The problem happens during execution of "TerminalUI::Screen::output"
(frame mawww#18). When we receive SIGWINCH while writing to stdout, write(2)
fails with EAGAIN, prompting us to handle pending events (See ae001a1
(Run EventManager whenever writing to a file descriptor would block,
2022-05-10)).  We update the screen size in check_resize() here:

	mawww#4  Kakoune::TerminalUI::check_resize (force=<optimized out>) at terminal_ui.cc:683
	mawww#5  Kakoune::TerminalUI::get_next_key () at terminal_ui.cc:719
	mawww#6  operator() (__closure=0x555555984198) at terminal_ui.cc:484
	mawww#7  std::__invoke_impl<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__f=...) at /usr/include/c++/12.2.1/bits/invoke.h:61
	mawww#8  std::__invoke_r<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__fn=...) at /usr/include/c++/12.2.1/bits/invoke.h:111
	mawww#9  std::_Function_handler<void(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode), Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)> >::_M_invoke(const std::_Any_data &, Kakoune::FDWatcher &, Kakoune::FdEvents &&, Kakoune::EventMode &&) (__functor=..., __args#0=..., __args#1=<optimized out>, __args#2=<optimized out>) at /usr/include/c++/12.2.1/bits/std_function.h:290
	mawww#10 std::function<void (Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>::operator()(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode) const (__args#2=<optimized out>, __args#1=<optimized out>,  __args#0=...) at /usr/include/c++/12.2.1/bits/std_function.h:591
	mawww#11 Kakoune::FDWatcher::run (mode=Kakoune::EventMode::Urgent, events=<optimized out>) at event_manager.cc:28
	mawww#12 Kakoune::EventManager::handle_next_events (mode=mode@entry=Kakoune::EventMode::Urgent, sigmask=sigmask@entry=0x0, block=<optimized out>, block@entry=false) at event_manager.cc:143
	mawww#13 Kakoune::write (fd=1, data=...) at file.cc:273
	mawww#14 Kakoune::BufferedWriter<4096>::flush () at string.hh:236
	mawww#15 Kakoune::BufferedWriter<4096>::write (data="t file.hh:145
	mawww#16 Kakoune::TerminalUI::Screen::set_face (face=..., writer=...) at terminal_ui.cc:255
	mawww#17 operator() (line=..., __closure=<synthetic pointer>) at terminal_ui.cc:326
	mawww#18 Kakoune::TerminalUI::Screen::output (force=force@entry=true, synchronized=<optimized out>, writer=...) at terminal_ui.cc:402
	mawww#19 Kakoune::TerminalUI::redraw (force=force@entry=true) at terminal_ui.cc:571
	mawww#20 Kakoune::TerminalUI::refresh (force=<optimized out>) at terminal_ui.cc:592
	mawww#21 Kakoune::Client::redraw_ifn () at client.cc:282
	mawww#22 Kakoune::ClientManager::redraw_clients () at client_manager.cc:232
	mawww#23 Kakoune::run_server (session=..., server_init=..., client_init=..., init_buffer="fish-rust/src/ast.rs", init_coord=..., flags=Kakoune::ServerFlags::None, ui_type=Kakoune::UIType::Terminal,
	    debug_flags=<optimized out>, files=ArrayView<Kakoune::StringView> = {...}) at main.cc:893
	mawww#24 main (argc=<optimized out>, argv=<optimized out>) at main.cc:1243

Thereafter, "TerminalUI::Screen::output" resumes and crashes due to
a buffer overflow in "lines" which has been resized.
krobelus added a commit to krobelus/kakoune that referenced this issue Mar 18, 2023
When Kakoune's terminal is shown on my laptop monitor and I plug
in my external monitor, the terminal's workspace will move to that
external monitor. When this happens, Kakoune may segfault.
There are multiple resize events (SIGWINCH) in quick succession;
it crashes because we handle SIGWINCH during rendering.

The problem happens during execution of "TerminalUI::Screen::output"
(frame mawww#18). When we receive SIGWINCH while writing to stdout, write(2)
fails with EAGAIN, prompting us to handle pending events (See ae001a1
(Run EventManager whenever writing to a file descriptor would block,
2022-05-10)).  We update the screen size in check_resize() here:

	mawww#4  Kakoune::TerminalUI::check_resize (force=<optimized out>) at terminal_ui.cc:683
	mawww#5  Kakoune::TerminalUI::get_next_key () at terminal_ui.cc:719
	mawww#6  operator() (__closure=0x555555984198) at terminal_ui.cc:484
	mawww#7  std::__invoke_impl<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__f=...) at /usr/include/c++/12.2.1/bits/invoke.h:61
	mawww#8  std::__invoke_r<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__fn=...) at /usr/include/c++/12.2.1/bits/invoke.h:111
	mawww#9  std::_Function_handler<void(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode), Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)> >::_M_invoke(const std::_Any_data &, Kakoune::FDWatcher &, Kakoune::FdEvents &&, Kakoune::EventMode &&) (__functor=..., __args#0=..., __args#1=<optimized out>, __args#2=<optimized out>) at /usr/include/c++/12.2.1/bits/std_function.h:290
	mawww#10 std::function<void (Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>::operator()(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode) const (__args#2=<optimized out>, __args#1=<optimized out>,  __args#0=...) at /usr/include/c++/12.2.1/bits/std_function.h:591
	mawww#11 Kakoune::FDWatcher::run (mode=Kakoune::EventMode::Urgent, events=<optimized out>) at event_manager.cc:28
	mawww#12 Kakoune::EventManager::handle_next_events (mode=mode@entry=Kakoune::EventMode::Urgent, sigmask=sigmask@entry=0x0, block=<optimized out>, block@entry=false) at event_manager.cc:143
	mawww#13 Kakoune::write (fd=1, data=...) at file.cc:273
	mawww#14 Kakoune::BufferedWriter<4096>::flush () at string.hh:236
	mawww#15 Kakoune::BufferedWriter<4096>::write (data="t file.hh:145
	mawww#16 Kakoune::TerminalUI::Screen::set_face (face=..., writer=...) at terminal_ui.cc:255
	mawww#17 operator() (line=..., __closure=<synthetic pointer>) at terminal_ui.cc:326
	mawww#18 Kakoune::TerminalUI::Screen::output (force=force@entry=true, synchronized=<optimized out>, writer=...) at terminal_ui.cc:402
	mawww#19 Kakoune::TerminalUI::redraw (force=force@entry=true) at terminal_ui.cc:571
	mawww#20 Kakoune::TerminalUI::refresh (force=<optimized out>) at terminal_ui.cc:592
	mawww#21 Kakoune::Client::redraw_ifn () at client.cc:282
	mawww#22 Kakoune::ClientManager::redraw_clients () at client_manager.cc:232
	mawww#23 Kakoune::run_server (session=..., server_init=..., client_init=..., init_buffer="fish-rust/src/ast.rs", init_coord=..., flags=Kakoune::ServerFlags::None, ui_type=Kakoune::UIType::Terminal,
	    debug_flags=<optimized out>, files=ArrayView<Kakoune::StringView> = {...}) at main.cc:893
	mawww#24 main (argc=<optimized out>, argv=<optimized out>) at main.cc:1243

Thereafter, "TerminalUI::Screen::output" resumes and crashes due to
a buffer overflow in "lines" which has been resized.
krobelus added a commit to krobelus/kakoune that referenced this issue Apr 16, 2023
When Kakoune's terminal is shown on my laptop monitor and I plug
in my external monitor, the terminal's workspace will move to that
external monitor. When this happens, Kakoune may segfault.
There are multiple resize events (SIGWINCH) in quick succession;
it crashes because we handle SIGWINCH during rendering.

The problem happens during execution of "TerminalUI::Screen::output"
(frame mawww#18). When we receive SIGWINCH while writing to stdout, write(2)
fails with EAGAIN, prompting us to handle pending events (See ae001a1
(Run EventManager whenever writing to a file descriptor would block,
2022-05-10)).  We update the screen size in check_resize() here:

	mawww#4  Kakoune::TerminalUI::check_resize (force=<optimized out>) at terminal_ui.cc:683
	mawww#5  Kakoune::TerminalUI::get_next_key () at terminal_ui.cc:719
	mawww#6  operator() (__closure=0x555555984198) at terminal_ui.cc:484
	mawww#7  std::__invoke_impl<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__f=...) at /usr/include/c++/12.2.1/bits/invoke.h:61
	mawww#8  std::__invoke_r<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__fn=...) at /usr/include/c++/12.2.1/bits/invoke.h:111
	mawww#9  std::_Function_handler<void(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode), Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)> >::_M_invoke(const std::_Any_data &, Kakoune::FDWatcher &, Kakoune::FdEvents &&, Kakoune::EventMode &&) (__functor=..., __args#0=..., __args#1=<optimized out>, __args#2=<optimized out>) at /usr/include/c++/12.2.1/bits/std_function.h:290
	mawww#10 std::function<void (Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>::operator()(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode) const (__args#2=<optimized out>, __args#1=<optimized out>,  __args#0=...) at /usr/include/c++/12.2.1/bits/std_function.h:591
	mawww#11 Kakoune::FDWatcher::run (mode=Kakoune::EventMode::Urgent, events=<optimized out>) at event_manager.cc:28
	mawww#12 Kakoune::EventManager::handle_next_events (mode=mode@entry=Kakoune::EventMode::Urgent, sigmask=sigmask@entry=0x0, block=<optimized out>, block@entry=false) at event_manager.cc:143
	mawww#13 Kakoune::write (fd=1, data=...) at file.cc:273
	mawww#14 Kakoune::BufferedWriter<4096>::flush () at string.hh:236
	mawww#15 Kakoune::BufferedWriter<4096>::write (data="t file.hh:145
	mawww#16 Kakoune::TerminalUI::Screen::set_face (face=..., writer=...) at terminal_ui.cc:255
	mawww#17 operator() (line=..., __closure=<synthetic pointer>) at terminal_ui.cc:326
	mawww#18 Kakoune::TerminalUI::Screen::output (force=force@entry=true, synchronized=<optimized out>, writer=...) at terminal_ui.cc:402
	mawww#19 Kakoune::TerminalUI::redraw (force=force@entry=true) at terminal_ui.cc:571
	mawww#20 Kakoune::TerminalUI::refresh (force=<optimized out>) at terminal_ui.cc:592
	mawww#21 Kakoune::Client::redraw_ifn () at client.cc:282
	mawww#22 Kakoune::ClientManager::redraw_clients () at client_manager.cc:232
	mawww#23 Kakoune::run_server (session=..., server_init=..., client_init=..., init_buffer="fish-rust/src/ast.rs", init_coord=..., flags=Kakoune::ServerFlags::None, ui_type=Kakoune::UIType::Terminal,
	    debug_flags=<optimized out>, files=ArrayView<Kakoune::StringView> = {...}) at main.cc:893
	mawww#24 main (argc=<optimized out>, argv=<optimized out>) at main.cc:1243

Thereafter, "TerminalUI::Screen::output" resumes and crashes due to
a buffer overflow in "lines" which has been resized.
krobelus added a commit to krobelus/kakoune that referenced this issue Apr 24, 2023
When Kakoune's terminal is shown on my laptop monitor and I plug
in my external monitor, the terminal's workspace will move to that
external monitor. When this happens, Kakoune may segfault.
There are multiple resize events (SIGWINCH) in quick succession;
it crashes because we handle SIGWINCH during rendering.

The problem happens during execution of "TerminalUI::Screen::output"
(frame mawww#18). When we receive SIGWINCH while writing to stdout, write(2)
fails with EAGAIN, prompting us to handle pending events (See ae001a1
(Run EventManager whenever writing to a file descriptor would block,
2022-05-10)).  We update the screen size in check_resize() here:

	mawww#4  Kakoune::TerminalUI::check_resize (force=<optimized out>) at terminal_ui.cc:683
	mawww#5  Kakoune::TerminalUI::get_next_key () at terminal_ui.cc:719
	mawww#6  operator() (__closure=0x555555984198) at terminal_ui.cc:484
	mawww#7  std::__invoke_impl<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__f=...) at /usr/include/c++/12.2.1/bits/invoke.h:61
	mawww#8  std::__invoke_r<void, Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>&, Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode> (__fn=...) at /usr/include/c++/12.2.1/bits/invoke.h:111
	mawww#9  std::_Function_handler<void(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode), Kakoune::TerminalUI::TerminalUI()::<lambda(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)> >::_M_invoke(const std::_Any_data &, Kakoune::FDWatcher &, Kakoune::FdEvents &&, Kakoune::EventMode &&) (__functor=..., __args#0=..., __args#1=<optimized out>, __args#2=<optimized out>) at /usr/include/c++/12.2.1/bits/std_function.h:290
	mawww#10 std::function<void (Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode)>::operator()(Kakoune::FDWatcher&, Kakoune::FdEvents, Kakoune::EventMode) const (__args#2=<optimized out>, __args#1=<optimized out>,  __args#0=...) at /usr/include/c++/12.2.1/bits/std_function.h:591
	mawww#11 Kakoune::FDWatcher::run (mode=Kakoune::EventMode::Urgent, events=<optimized out>) at event_manager.cc:28
	mawww#12 Kakoune::EventManager::handle_next_events (mode=mode@entry=Kakoune::EventMode::Urgent, sigmask=sigmask@entry=0x0, block=<optimized out>, block@entry=false) at event_manager.cc:143
	mawww#13 Kakoune::write (fd=1, data=...) at file.cc:273
	mawww#14 Kakoune::BufferedWriter<4096>::flush () at string.hh:236
	mawww#15 Kakoune::BufferedWriter<4096>::write (data="t file.hh:145
	mawww#16 Kakoune::TerminalUI::Screen::set_face (face=..., writer=...) at terminal_ui.cc:255
	mawww#17 operator() (line=..., __closure=<synthetic pointer>) at terminal_ui.cc:326
	mawww#18 Kakoune::TerminalUI::Screen::output (force=force@entry=true, synchronized=<optimized out>, writer=...) at terminal_ui.cc:402
	mawww#19 Kakoune::TerminalUI::redraw (force=force@entry=true) at terminal_ui.cc:571
	mawww#20 Kakoune::TerminalUI::refresh (force=<optimized out>) at terminal_ui.cc:592
	mawww#21 Kakoune::Client::redraw_ifn () at client.cc:282
	mawww#22 Kakoune::ClientManager::redraw_clients () at client_manager.cc:232
	mawww#23 Kakoune::run_server (session=..., server_init=..., client_init=..., init_buffer="fish-rust/src/ast.rs", init_coord=..., flags=Kakoune::ServerFlags::None, ui_type=Kakoune::UIType::Terminal,
	    debug_flags=<optimized out>, files=ArrayView<Kakoune::StringView> = {...}) at main.cc:893
	mawww#24 main (argc=<optimized out>, argv=<optimized out>) at main.cc:1243

Thereafter, "TerminalUI::Screen::output" resumes and crashes due to
a buffer overflow in "lines" which has been resized.
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

No branches or pull requests

2 participants