简体   繁体   中英

vscode extension API - how to get only visible lines of editor

I've searched the documentation but I could find nothing.

is there a way to get only the "visible" text of the document in the editor (so, I don't want to get the text / lines of hidden text by scrollbar)?

Thanks guys!

This is not possible with the current API.

You can make a feature request by creating an issue here: https://github.com/microsoft/vscode/issues

It's now possible via TextEditor.visibleRanges

https://github.com/Microsoft/vscode/issues/14756

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM