[vim/vim] Warning message when folding disabled; Ignoring g:sh_fold_enabled=0; need to re-compile vim for +fold support (Issue #10701)

11 views
Skip to first unread message

David le Blanc

unread,
Jul 11, 2022, 10:23:17 PM7/11/22
to vim/vim, Subscribed

Steps to reproduce

Hi, this is a trivial bug which made it hard to diagnose an unrelated problem

  1. Build vim without folding support
  2. Configure folding properties for sh

let g:sh_fold_enable=7

  1. Launch vim
  2. See message

Ignoring g:sh_fold_enabled=0; need to re-compile vim for +fold support

Expected behaviour

I would expect to see

Ignoring g:sh_fold_enabled=7; need to re-compile vim for +fold support

Note the value of g:sh_fold_enabled is cleared (reset to zero) in syntax/sh.vim prior to displaying the error message.

if !exists("g:sh_fold_enabled")
 let g:sh_fold_enabled= 0
elseif g:sh_fold_enabled != 0 && !has("folding")
 let g:sh_fold_enabled= 0
 echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support"
endif

Version of Vim

master - 9.0 patch level 49

Environment

Operating system independent.

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10701@github.com>

Bram Moolenaar

unread,
Jul 22, 2022, 3:23:14 PM7/22/22
to vim/vim, Subscribed

@cecamp


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10701/1192870224@github.com>

Hakkadaikon

unread,
Jun 15, 2025, 10:09:48 PMJun 15
to vim/vim, Subscribed
Hakkadaikon left a comment (vim/vim#10701)

The relevant code does not appear to have changed in the latest source code at the moment (e5297e3).

I think it would be fine to initialize the variable(g:sh_fold_enabled) after echomsg, but what do you think?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10701/2974901866@github.com>

Christian Brabandt

unread,
Jun 16, 2025, 3:04:26 AMJun 16
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#10701)

makes sense, yes


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10701/2975337599@github.com>

Christian Brabandt

unread,
Jun 16, 2025, 1:57:17 PMJun 16
to vim/vim, Subscribed

Closed #10701 as completed via 152a450.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/10701/issue_event/18175482550@github.com>

Reply all
Reply to author
Forward
0 new messages