Sublime Forum

Modifications to view.settings() object appear to be global

#1

I’m just trying to track down a plugin bug and I’ve come across what is either a bug, or an artefact of my ignorance.

Using the console in one view type (assuming the default word_separators list):

word_separators = view.settings().get("word_separators")
word_separators = word_separators.replace('.', '')
view.settings().set("word_separators", word_separators)

The change the view and check the output of

view.settings().get("word_separators")

The docs for view.settings() states:

I’d expect from that then that the word_separators value in one view wouldn’t be modified by the change in the other, or am I misunderstanding things?

0 Likes

#2

Worked fine for me in r3059. Are you sure you switched views (use view#id to get the id for a particular view)

0 Likes

#3

Huh, how odd. I have two Sublime Installs. Both r3059. In one the issue is reproducible (though I was using view.file_name() to check that the views were different), on the other it seems not be happening.

I’ve noticed though that I’m not the only one experiencing this issue, as the following seems to be linked:
forums.coronalabs.com/topic/4432 … tside-lua/

Until I can reproduce it on this machine though, it’s going to be hard to track down what’s behind it.

0 Likes