[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58873: 29.0.50; Fix indent-line-function in tree-sitter
From: |
Theodor Thornhill |
Subject: |
bug#58873: 29.0.50; Fix indent-line-function in tree-sitter |
Date: |
Sat, 29 Oct 2022 21:11:27 +0200 |
Hi Yuan!
There were some regressions with the new indent-line-function - see
attached patch. We need the point, not the indentation, and the
save-excursion is actually needed.
consider:
```
foo({
thing: 1,
tho|ng: 2, // <--- point is |
})
```
if you indent now you want to end up like this:
```
foo({
thing: 1,
tho|ng: 2, // <--- point is |
})
```
or if
```
foo({
thing: 1,
|thong: 2, // <--- point is |
})
```
You want to end up like this:
```
foo({
thing: 1,
|thong: 2, // <--- point is |
})
```
This patch addresses this :-)
In addition there was a bug where the parent-bol didn't indent
correctly, this should also be fixed now.
Thanks again, Yuan!
Theo
0001-Fix-indent-line-function.patch
Description: Fix indent-line-function in tree-sitter
- bug#58873: 29.0.50; Fix indent-line-function in tree-sitter,
Theodor Thornhill <=