orbitalquark / textadept

Textadept is a fast, minimalist, and remarkably extensible cross-platform text editor for programmers.
https://orbitalquark.github.io/textadept
MIT License
640 stars 38 forks source link

Version 12 changes indentation & tab settings when splitting views #397

Closed chrisgeli closed 1 year ago

chrisgeli commented 1 year ago

Thanks for sharing Textadept!

I'm using 12.0 alpha 3 under Debian and have noticed (actually since earlier 12.* versions) that when splitting views, the tab and indentation settings change.

Here are the steps to reproduce:

  1. Avoiding any config or session issues: /opt/textadept/textadept --nosession --userhome /tmp
  2. Set Buffer->Indentation->Tab width: 8
  3. Set Buffer->Indentation->Toggle use tabs to insert tab characters when pressing Tab
  4. Write something involving tabs and newlines, e.g. \ta\n\t\ta\n\t\t\ta to see the vertical tab guides and verify that the indentation is actually tabs and not spaces.
  5. Select View->Split View Horizontal (or Vertical)

When I do that, the new view shows the same content but with indentation having changed to 2 spaces and also when pressing the Tab key, 2 spaces are now inserted. The original view still shows the original indentation (but the guides have changed to 2) until I switch to it, at which point the indentation changes to be consistent (2 spaces).

It's just a minor annoyance, but sometimes it goes unnoticed and causes issues, e.g. when working with Makefiles (which require tabs).

snoopy commented 1 year ago

I've had a similar problem and forced TA to reload my buffer settings upon changes. That seems to have fixed it. Maybe this could work for you as well.

orbitalquark commented 1 year ago

Thanks for the report. This should be fixed via https://github.com/orbitalquark/textadept/commit/d73fbea70f9f0936d30b5b475efdd7cdc7006412 and will be in the next nightly build.