Closed raveit65 closed 3 years ago
@rbuj @mbkma @mate-desktop/core-team Can you please take a look at it? I am not really sure when this regression was introduced but i noticed this a first time during 1.25 development. Maybe when we merged the show-tabs and show-spaces feature?
I think it was introduced in commit 2edb465b646f671f3372c70f020bd3d3076e86ad. I will have a look what is wrong there. Edit: okay, no, sorry, I can not reproduce the issue.
Setting the tab width works correctly, setting a new value may cause to lose indent when using a monospaced font. For example, if the tab width is 8 spaces and you change it to 4, you will need to add twice as many tabs to align the text.
Yes, re-setting the tab-size works well. But when pluma is closed and tab-size is set to 8, than opening the file caused the wrong alignment of the lines. So, actual we're working with a wrong tab-size, if you don't know that a reset is needed.
Edit: okay, no, sorry, I can not reproduce the issue.
Hmm, ok, i will try to bisect pluma
@raveit65 which font do you use?
It is monospace 10
But maybe it is a problem with a underlying package in fedora 32. With an older (not updated) f31 VM and pluma-1.24.0 i can't reproduce the issue. I am actual updating the VM to latest package database from official fedora repos, and Mate is using the same package versions in all fedora versions. So let see what happens after the update.
Edit: pluma-1.24.1 in updated f31 VM doesn't have the issue. But same version in f32 on baremetal does have the issue :/ Ok, i will test more later....
We can store the tab width for each file in gvfs metadata as we're doing with language and other attributes.
$ LANG=C gio info --attributes=metadata:: mate-applets/cpufreq/src/cpufreq-prefs.c
uri: file:///home/robert/backup/mate-applets/cpufreq/src/cpufreq-prefs.c
local path: /home/robert/backup/mate-applets/cpufreq/src/cpufreq-prefs.c
unix mount: /dev/sda2[/home] /home btrfs rw,relatime,seclabel,ssd,space_cache,subvolid=256,subvol=/home
attributes:
metadata::annotation:
metadata::pluma-language: c
metadata::pluma-position: 1960
Don't know if it would fix this problem, but adding modelines like
/* ex:set ts=8 noet: */
may also help.
I found the problem. DPI was set to 180 inch and not to 192 inch for HIDPI like it should in font settings of m-c-c. So, this is definitely my own problem and caused by myself. Sorry for that noise :/
Expected behaviour
Tab-size is displayed correctly when open a file where tabs are used
Actual behaviour
Tab-size is displayed wrong when open a file where tabs are used
Steps to reproduce the behaviour
open eg. cpufreq-prefs.c from master, It use tab-size=8![pluma-tabs-size-wrong](https://user-images.githubusercontent.com/961604/97449008-84f9fe00-1931-11eb-990f-ddccd106ba44.png)
reset tab-size in preferences (eg. 8 to 9 and back to 8)
Et voila, tab-size is displayed correctly and all code lines are aligned.
This can really cause issues when reviewing PRs and people are using pluma as editor.
MATE general version
Package version
Linux Distribution
Fedora and probably all others.
Link to downstream report of your Distribution
1.26 isn't released and i don't file out reports against myself :P