Skip to content

Extra lens are displayed when buffer is narrowed #3228

@andreyorst

Description

@andreyorst

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command
emacs -q -l lsp-start-plain.el

where lsp-start-plain.el can be downloaded here.

Bug description

If the buffer is narrowed all lenses below the narrowed region are displayed at the last line.

Steps to reproduce

Open a buffer, and create some variables, so the server could return the lens, for them. Here's an example in Clojure:

(ns foo)
(def a nil)
(def b nil)
(def c nil)
(def d nil)

Here are the lenses:

image

Then narrow to defun on (def a nil) line:

image

Expected behavior

Only one lens is displayed.

Which Language Server did you use?

clojure-lsp

OS

Linux

Error callstack

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions