editor.getCursor().line is different on a separated window(solved)

Steps to reproduce

For an exact same line of the same document the line returned is e.g 6 on the main window and then 5 on a separated window

Expected result

on the main window getCursor().line should begin at 0? and be the same on a separated window, when being at the same line

it was because I wasn’t preventing the default event