Sublime Forum

Retrieving inserted and deleted text

#41

Wow! Great idea! Need to check bookmarks API. Thanks.

1 Like

#42

You can just use view.add_regions to add invisible regions and retrieve them afterwards with view.get_regions. Those regions move with the text to stay at the position they were added.

4 Likes

#43

Apparently there is no documented bookmarks API :frowning:

1 Like

#45

(Bookmarks can be accessed via the regions API using “bookmarks” as the key.)

so basically the bookmarks functionality just uses what @r-stein suggested:

1 Like

#46

Thank you for the suggestion. This might work.

1 Like