Hi, I've made changes that allow for keeping the fold margin non-visible, 
but still be able to fold code (eg. via the shortcuts).

UI Additions:
- "Show fold margin" in Preferences > Editor > Display.
- "Show fold margin" in the View menu.

If code folding is disabled:
- The 1st UI addition becomes greyed out, similarly to "Fold/unfold all 
children of a fold point"
- The 2nd UI addition disappears, similarly to "Fold/Unfold All" in 
the Document menu.

Furthermore, if the code folding option is disabled and it becomes enabled, 
"Show fold margin" is automatically enabled. The rationale is to 
avoid confusing someone that enabled folding, but is not seeing any fold margin.

Finally, in the 2nd commit, which is actually not directly related to the above 
additions, I've added some logic to automatically unfold all code when 
switching off folding. Without it, already folded code will remain in the 
folded state with no option to unfold it without re-enabling the option. Should 
I make a different PR for this? (asusming it even is desired!)

Also, should I or would you suggest that I also modify the manual to document 
the additions?
Should I add something about the new UI options in the language/translation 
files?
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/2927

-- Commit Summary --

  * <a 
href="https://github.com/geany/geany/pull/2927/commits/3493f32c921218ae8512537898e0ad46807f2941";>Add
 UI option to hide the fold margin, while keeping code folding</a>
  * <a 
href="https://github.com/geany/geany/pull/2927/commits/3ff536201efb74307c837f7585e0869be59d88fe";>Automatically
 unfold all code when folding is switched off in preferences</a>

-- File Changes --

    M data/geany.glade (30)
    M src/callbacks.c (10)
    M src/editor.c (6)
    M src/editor.h (1)
    M src/keyfile.c (2)
    M src/prefs.c (17)
    M src/ui_utils.c (5)
    M src/ui_utils.h (1)

-- Patch Links --

https://github.com/geany/geany/pull/2927.patch
https://github.com/geany/geany/pull/2927.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2927

Reply via email to