Skip to content

Commit adffa2e

Browse files
committed
review comments
1 parent 54bdd11 commit adffa2e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

helix-core/src/auto_pairs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ fn handle_open(doc: &Rope, selection: &Selection, pair: &Pair) -> Transaction {
272272
let next_char = doc.get_char(cursor);
273273
let len_inserted;
274274

275+
// Since auto pairs are currently limited to single chars, we're either
276+
// inserting exactly one or two chars. When arbitrary length pairs are
277+
// added, these will need to be changed.
275278
let change = match next_char {
276279
Some(_) if !pair.should_close(doc, start_range) => {
277280
len_inserted = 1;

helix-term/tests/test/auto_pairs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async fn insert_basic() -> anyhow::Result<()> {
2828

2929
#[tokio::test]
3030
async fn insert_configured_multi_byte_chars() -> anyhow::Result<()> {
31-
// [NOTE] these are multi-byte Unicode characters
31+
// NOTE: these are multi-byte Unicode characters
3232
let pairs = hashmap!('„' => '“', '‚' => '‘');
3333
let config = Config {
3434
editor: helix_view::editor::Config {

0 commit comments

Comments
 (0)