feat: add smart_delete_backward command for improved smart pair handling
This commit is contained in:
parent
e34aed4a95
commit
c984f3c392
3 changed files with 63 additions and 1 deletions
|
@ -38,6 +38,25 @@ pub fn control_code_to_unicode(code: u8) [:0]const u8 {
|
|||
};
|
||||
}
|
||||
|
||||
pub const char_pairs = [_]struct { []const u8, []const u8 }{
|
||||
.{ "\"", "\"" },
|
||||
.{ "'", "'" },
|
||||
.{ "(", ")" },
|
||||
.{ "(", ")" },
|
||||
.{ "[", "]" },
|
||||
.{ "[", "]" },
|
||||
.{ "{", "}" },
|
||||
.{ "{", "}" },
|
||||
.{ "‘", "’" },
|
||||
.{ "‘", "’" },
|
||||
.{ "“", "”" },
|
||||
.{ "“", "”" },
|
||||
.{ "‚", "‘" },
|
||||
.{ "‚", "‘" },
|
||||
.{ "«", "»" },
|
||||
.{ "«", "»" },
|
||||
};
|
||||
|
||||
fn raw_byte_to_utf8(cp: u8, buf: []u8) ![]const u8 {
|
||||
var utf16le: [1]u16 = undefined;
|
||||
const utf16le_as_bytes = std.mem.sliceAsBytes(utf16le[0..]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue