Sublime Forum

Line numbers are of in big files

#1

Hi,

it seems to me, that in big files (e.g. a sql-dump) the line number are not correct (wordwrap and syntax highlighting doesn’t matter for me). I’m on build 2200

See the attached screenshot, the right side is the same file im vim at line 20000. Sadly i can’t provide the file which i used (its client data), but maybe i can provide a dummy-sql file which produces the sames results (if you need it).

http://i.imgur.com/KOXo5.jpg

Thanks in advance :smile:.

0 Likes

#2

I tried with a 50000 lines file and ST2 has the same line number compared to 2 others text editor.

However, I have a different version:
startup, version: 2219 windows x64 channel: nightly

You can try yourself by creating a new file, opening the console and typing these 3 lines:

e = view.begin_edit() [view.insert(e, 0, str(i)+'TOTO'*50+'\n') for i in range(50000, 0, -1)] view.end_edit(e)
It must create 50000 lines with each line beginning with the line number.

0 Likes

#3

hi,

it seems the file must contain more diverse content and some longer lines.

i’ll try to generate a demo file.

0 Likes

#4

It’s likely to be a difference in what Sublime Text considers a newline vs what vim considers a newline. Sublime Text will count a stray CR character as a newline, while vim won’t.

0 Likes

#5

thats possible as the file is generated in an quite obscure way. i’ll check that :smile:

0 Likes