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

set filetype sets the filetype for all opened tabs and not the current focused #3395

Open
theredcmdcraft opened this issue Jul 17, 2024 · 4 comments

Comments

@theredcmdcraft
Copy link
Contributor

Description of the problem or steps to reproduce

If you have multiple files opened in multiple tabs and press Ctrl+e for the Micro internal shell and set the filetype with set filetype txt to txt, for example, this will change the filetype for all open tabs and not for the current focused tab. I would expect that if i set the filetype it only will happen for the current focused tab.

If you need more informations about my system or something else, feel free to ask me.

Specifications

Commit hash: Version: 2.0.11
OS: Debian 12.5

user@host ~ # cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Terminal: xterm-256color (hopefully correct)

@Andriamanitra
Copy link
Contributor

There is a separate setlocal command that you can use instead of set when you only want to change a setting in the current buffer.

@dmaluka
Copy link
Collaborator

dmaluka commented Jul 17, 2024

Actually the filetype option is a special case, it is local-only, so even set filetype should set the filetype for the current buffer only. It was fixed in #3042.

@theredcmdcraft
Copy link
Contributor Author

Okay. Thank you for the quick reply. Is it fixed in a released version?

@dmaluka
Copy link
Collaborator

dmaluka commented Jul 18, 2024

No, the latest release 2.0.13 was in Oct 2023, while #3042 was merge in Mar 2024.
Maybe we will make a new release soon. In the meantime you can either use a nightly build from https://github.com/zyedidia/micro/releases/tag/nightly, or compile micro yourself, or just use setlocal filetype.

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

3 participants