Fix infinite loop in select all (#3154)
[[PR Description]] Release Notes: - Fixed an infinite loop in select all matches ([#2170](https://github.com/zed-industries/community/issues/2170)).
This commit is contained in:
@@ -734,3 +734,26 @@ async fn test_paragraphs_dont_wrap(cx: &mut gpui::TestAppContext) {
|
||||
two"})
|
||||
.await;
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_select_all_issue_2170(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = VimTestContext::new(cx, true).await;
|
||||
|
||||
cx.set_state(
|
||||
indoc! {"
|
||||
defmodule Test do
|
||||
def test(a, ˇ[_, _] = b), do: IO.puts('hi')
|
||||
end
|
||||
"},
|
||||
Mode::Normal,
|
||||
);
|
||||
cx.simulate_keystrokes(["g", "a"]);
|
||||
cx.assert_state(
|
||||
indoc! {"
|
||||
defmodule Test do
|
||||
def test(a, «[ˇ»_, _] = b), do: IO.puts('hi')
|
||||
end
|
||||
"},
|
||||
Mode::Visual,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user