Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabline extends past scope #26274

Open
leslykinzel opened this issue Mar 7, 2025 · 0 comments
Open

Tabline extends past scope #26274

leslykinzel opened this issue Mar 7, 2025 · 0 comments

Comments

@leslykinzel
Copy link

Summary

Tabline visually extends beyond its scope unless there is text after it. (This may affect any code that uses indentation to define scope)

Steps to trigger the problem:

  1. Create a new python file.
  2. Create an indented structure, such as a function or a loop.

For example:

def main():
    print('I love Zed')
  1. Add some newlines after it.
  2. Add some more text below the indented code, and see the tabline go back to its correct length.

For example:

def main():
    print('I love Zed')

if __name__ == '__main__':
    main()

Now the tabline extends out of scope of the if statement as long as there is a newline after it.

Actual Behavior:

You should see the tabline extending one extra line below the scope, as long as there is no text after it.

Image

Adding any text on a subsequent line will fix this. This issue only occurs when an indented structure is the last piece of code in a file.

Image

Expected Behavior:

The tabline should not extend beyond the scope unless there is another line ahead that is in the same scope.

These screenshots are from the same file in vscode:

Image

Image

This issue can be temporarily avoided by adding "ensure_final_newline_on_save": false to settings.json and ensuring that the file does not end with an empty line.

Zed Version and System Specs

Zed: v0.176.3 (Zed)
OS: Linux X11 linuxmint 22.1
Memory: 62 GiB
Architecture: x86_64
GPU: AMD Radeon RX 7900 XTX (RADV NAVI31) || radv || Mesa 24.0.9-0ubuntu0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant