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

buffer: foldmethod is used as a buffer option #269

Closed
Milly opened this issue Aug 29, 2024 · 3 comments
Closed

buffer: foldmethod is used as a buffer option #269

Milly opened this issue Aug 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Milly
Copy link
Contributor

Milly commented Aug 29, 2024

Describe the bug

'foldmethod' is "local to window" option.

						*'foldmethod'* *'fdm'*
'foldmethod' 'fdm'	string (default: "manual")
			local to window
			{not available when compiled without the |+folding|
			feature}
	The kind of folding used for the current window.  Possible values:
	|fold-manual|	manual	    Folds are created manually.
	|fold-indent|	indent	    Lines with equal indent form a fold.
	|fold-expr|	expr	    'foldexpr' gives the fold level of a line.
	|fold-marker|	marker	    Markers are used to specify folds.
	|fold-syntax|	syntax	    Syntax highlighting items specify folds.
	|fold-diff|	diff	    Fold text that is not changed.

But it is used as "local to buffer" option in the buffer module.

let foldmethod = getbufvar(a:bufnr, '&foldmethod')

op.foldmethod.getBuffer(denops, bufnr),

Expected behavior

Use as "local to window" option, or remove it if unnecessary.

@Milly Milly added the bug Something isn't working label Aug 29, 2024
@Milly
Copy link
Contributor Author

Milly commented Aug 29, 2024

@lambdalisue
What happens if we don't change the foldmethod=manual? I couldn't figure it out from the tests.

@lambdalisue
Copy link
Member

lambdalisue commented Aug 29, 2024

To be honest, I don’t remember at all. But I have a vague feeling that I might have been tweaking foldmethod by mistake instead of undolevel (if so, it make sense to keep undo history.)

So, let's remove that and see what happens (we'll see.)

@Milly
Copy link
Contributor Author

Milly commented Sep 6, 2024

Closes by #271

@Milly Milly closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants