leanprover / leanprover/lean4

Wrong InfoView state in term mode on whitespace

Open
#9,492 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Description

Given

example : True :=
  let a := 1
  let b := 2
  -- <cursor>
  sorry

InfoView reflects a but not b:

Image

This is annoying because it requires constantly moving the cursor down from where you're typing to see the current state. This is only a problem in term mode — tactic mode works fine.

Context

Extracted from #new members > Term mode feels like an afterthought @ 💬.

Steps to Reproduce
  1. Write above code
  2. Place cursor where it says "cursor"

Expected behavior: Both a and b appear in InfoView

Actual behavior: Only a appears in InfoView

Versions

lean4:v4.22.0-rc3

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Lean v4.22.0-rc3 using the provided term-mode example, placing the cursor on the marked whitespace, and compare it with tactic mode. Trace the InfoView update path for term mode; done means the InfoView shows both a and b at the cursor position without moving the cursor.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.