Sublime Forum

What's the meaning of using a position when calling view.meta_info?

#1

I didn’t want to open a new thread for this simple question (kindof related to the current one) but… what’s the meaning of using a position when calling view.meta_info?

Does that mean the view meta information will change depending the view position? If I’m not mistaken this information comes from the tmPreferences… but I’d like to understand how Sublime uses the position in this case.

And yeah, I guess my question is related to https://github.com/SublimeTextIssues/Core/issues/1437

Thx!

0 Likes

API Suggestions
#2

The point is used to determine the scope of metadata that should be returned. For example, shellVariables contains the variables that are used for commenting, which is different on a syntax by syntax basis. When you provide a position in the view, Sublime uses that position to determine what meta_info it should be dealing with (since one syntax can embed another).

1 Like

#3

Mmmm, interesting, could you please put a simple text+syntax where I can test your explanation to fully understand? Thanks in advance!

0 Likes