Pressing tab always indents with two spaces with "Indent using tabs" disabled, ignoring "Tab indent size"

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Open settings and disable “Indent using tabs”.
  2. Change “Tab indent size” to something other than “2”.
  3. Open a note and press tab to indent lines.

Expected result

Indentation follows the setting in “Tab indent size”, up to 4 spaces.

Actual result

Indentation only uses 2 spaces.

Environment

  • Operating system: Windows 11 Pro
  • Debug info:

SYSTEM INFO:
Obsidian version: v1.1.9
Installer version: v1.1.9
Operating system: Windows 10 Pro 10.0.22621
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Another user on the official Discord server said this setting worked for them when using spaces.

Hm, I’m struggling to reproduce this in the Sandbox vault.

The first was produced with a tab size setting of two spaces, the second with a tab size of four.

I just tried it again and had some very strange and inconsistent behaviour. For context, I originally noticed this bug while playing around with settings to file this other bug report: Tabs outside of lists render with the wrong width - #3 by LyD

Today, I also was not able to reproduce it with spaces. It seemed to be working fine in both sandbox mode and my vault, including the original note I was testing it out on. However, when I enabled “Indent using tabs” I had the opposite problem - tabs weren’t following the setting on my personal vault. Over on the sandbox vault it was working fine. It even dynamically changed the size of tabs as soon as I changed that setting. Still had no affect on my personal vault.

I decided to take a screen recording to show the problem. Took a break, downloaded OBS, then recorded myself testing out both vaults side by side. The behaviour changed again! This time the sandbox was also not picking up the setting when using tabs. Closing and reopening the sandbox didn’t help, it still had the issue with tabs.

Here’s the screen recording, sandbox is on the top left and personal vault is bottom right. Apologies for how poor it is for a bug report, fumbling around and not making it more clear what I’m doing. I only noticed the behaviour changed in the middle of recording it, and I’m really not sure what happened to reproduce it.

If I completely close Obsidian, reopen it (opens my personal vault), then open the sandbox, tabs are still behaving poorly but spaces are fine.

I haven’t been able to repro

I’ve narrowed down the issue a little bit. When a paragraph has a list right before it the tab to indent feature works. When there is no list or another feature between them it inserts four spaces. This behavior occurs regardless of what settings I select.

Screenshot 2023-04-06 120600

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.