Home Download Buy Blog Forum Support

Line numbers are of in big files

Line numbers are of in big files

Postby myel on Fri Sep 21, 2012 6:52 am

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).

Image

Thanks in advance :).
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: Line numbers are of in big files

Postby bizoo on Fri Sep 21, 2012 8:56 am

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:
Code: Select all
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.
bizoo
 
Posts: 883
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Line numbers are of in big files

Postby myel on Fri Sep 21, 2012 12:31 pm

hi,

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

i'll try to generate a demo file.
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: Line numbers are of in big files

Postby jps on Fri Sep 21, 2012 2:51 pm

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.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Line numbers are of in big files

Postby myel on Fri Sep 21, 2012 4:35 pm

thats possible as the file is generated in an quite obscure way. i'll check that :)
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], nonolly, Yahoo [Bot] and 16 guests