Update commands to use x instead of <a-x> due to new kak change

This commit is contained in:
Austen Adler 2023-03-11 18:05:42 -05:00
parent b5e854521f
commit 342e59727a
2 changed files with 6 additions and 6 deletions

View File

@ -70,10 +70,10 @@ fn boxed_selections(options: &Options) -> Result<Vec<SelectionDesc>, KakError> {
let whole_line_selection_command = if options.no_newline {
// Select everything and only keep non-newlines
"<a-x>s^[^\\n]+<ret>"
"xs^[^\\n]+<ret>"
} else {
// Select everything and split
"<a-x><a-s>"
"x<a-s>"
};
// Whole-row selections split on newline
@ -128,11 +128,11 @@ fn boxed_selections(options: &Options) -> Result<Vec<SelectionDesc>, KakError> {
/// Returns a vec of `selections_desc` of the intersection of the bounding box and the component rows
///
/// This function takes a selection desc, and its whole-row split selections (`<a-x><a-s>`).
/// This function takes a selection desc, and its whole-row split selections (`x<a-s>`).
/// For each whole-row (col 1 to max col) selection, it finds the intersection between the min col and max col in `selection_desc`
///
/// * `selection_desc` - The base (possibly multiline) `selection_desc`
/// * `selections_desc_rows` - Vec of above `selection_desc` split by line (`<a-x><a-s>`)
/// * `selections_desc_rows` - Vec of above `selection_desc` split by line (`x<a-s>`)
fn to_boxed_selections<SD1, SD2>(
selection_desc: SD1,
selections_desc_rows: &[SD2],

View File

@ -29,9 +29,9 @@ pub fn invert(options: &Options) -> Result<String, KakError> {
// Select everything and split
(false, false) => "%<a-s>",
// Select entire line, then remove newline
(true, true) => "<a-x><a-s>s^[^\\n]+<ret>",
(true, true) => "x<a-s>s^[^\\n]+<ret>",
// Select entire line, including newline
(true, false) => "<a-x><a-s>",
(true, false) => "x<a-s>",
};
let document_descs: Vec<SelectionDesc> = {