Skip to content

fix: show correct tactic state in whitespace between tactics without incrementality - #14396

Merged
Kha merged 1 commit into
masterfrom
fix-14394-whitespace-goals
Jul 15, 2026
Merged

Kha merged 1 commit into
masterfrom
fix-14394-whitespace-goals

Conversation

@Kha

@Kha Kha commented Jul 15, 2026

Copy link
Copy Markdown
Member

Regression introduced in #12662.

Closes #14394.

…incrementality

Without tactic incrementality — in particular for `by` blocks nested inside terms and in batch-mode elaboration — `evalSepTactics` ran each tactic on its `unsetTrailing`-trimmed syntax, introduced for reuse-key stability, so the recorded info tree did not cover the tactic's trailing whitespace and `goalsAt?` fell back to the enclosing sequence node: placing the cursor on a blank line between two tactics showed the state before the preceding tactic instead of after it. Use the untrimmed syntax on the non-incremental path, where there is no reuse that trimming could stabilize; the incremental path already restores trailing coverage and is unaffected.

Closes #14394.

Co-Authored-By: Claude
@Kha
Kha requested a review from kim-em as a code owner July 15, 2026 09:48
@Kha
Kha enabled auto-merge July 15, 2026 09:49
@github-actions github-actions Bot added toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN labels Jul 15, 2026
@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Jul 15, 2026
@leanprover-bot

leanprover-bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Jul 15, 2026
@mathlib-lean-pr-testing

mathlib-lean-pr-testing Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Mathlib CI status (docs):

@Kha Kha added the changelog-no Do not include this PR in the release changelog label Jul 15, 2026
@Kha
Kha added this pull request to the merge queue Jul 15, 2026
Merged via the queue into master with commit 0c937a2 Jul 15, 2026
51 of 54 checks passed
@mathlib-lean-pr-testing mathlib-lean-pr-testing Bot added builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Jul 15, 2026
Garmelon pushed a commit that referenced this pull request Jul 15, 2026
…ace between tactics without incrementality (#14400)

Backport 0c937a2 from #14396.

Co-authored-by: Sebastian Ullrich <[email protected]>
@Kha
Kha deleted the fix-14394-whitespace-goals branch July 15, 2026 13:23
wrenna-robson pushed a commit to wrenna-robson/lean4 that referenced this pull request Jul 17, 2026
robsimmons pushed a commit that referenced this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport releases/v4.33.0 builds-manual CI has verified that the Lean Language Reference builds against this PR builds-mathlib CI has verified that Mathlib builds against this PR changelog-no Do not include this PR in the release changelog mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infoview shows incorrect tactic state on empty line

3 participants