Skip to content

[Question] Get information of change of a model #3657

Answered by ted-marozzi
chengtie asked this question in Q&A
Discussion options

You must be logged in to vote

Perhaps editor.onDidChangeModelContent((a) => console.log(a)); is what you want

{
    "changes": [
        {
            "range": {
                "startLineNumber": 9,
                "startColumn": 6,
                "endLineNumber": 9,
                "endColumn": 6
            },
            "rangeLength": 0,
            "text": "o",
            "rangeOffset": 74,
            "forceMoveMarkers": false
        }
    ],
    "eol": "\n",
    "versionId": 7,
    "isUndoing": false,
    "isRedoing": false,
    "isFlush": false
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hediet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
3 participants
Converted from issue

This discussion was converted from issue #3050 on March 03, 2023 13:23.