Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Source code cut off #222

Closed
joseds opened this Issue Sep 12, 2012 · 16 comments

Comments

Projects
None yet
5 participants

joseds commented Sep 12, 2012

Hi,
thank you for adding the ability to browse source code, that's a very useful feature. I noticed that only part of the code is being displayed, I had e.g. 101 lines in one and 201 lines in another case. Is this limit perhaps character count based?
Source code browsing would not be very useful for me if such a cut–off exists. Is this a bug or is there a strong reason behind it?
José

Contributor

kevinsawicki commented Sep 12, 2012

Hi, there shouldn't be any limit to the amount of code being browsed.

What phone and Android version are you on?

Also, can you share the repository and path of the specific file that was cut off? Thanks.

joseds commented Sep 12, 2012

Hi, I am using a Samsung Galaxy Nexus with the current Android version (4.1.1). I just noticed a funny thing: The phone was in portrait orientation when opening a source code file and I could see 101 lines. When I had scrolled to the last line and tilted the phone to landscape mode, 101 more lines did appear. Thus, by scrolling to the end and switching orientation repeatedly, I could see the whole contents.

One of the files I browsed is one in a private repository, namely the file joseds/DBIx-Table-TestDataGenerator/lib/Table/DBIx/TestDataGenerator.pm I don't know if you have access to it, otherwise I could put it in a public repository. But my guess is that it has nothing to do with the specific file. Thanks!

Contributor

kevinsawicki commented Sep 12, 2012

Definitely sounds like a bug, will try reproducing and see about upgrading the CodeMirror
version used for source code viewing.

I have noticed this bug too, but only on private repository files. Always at 101 lines.

It may be related that there seems to be a line lenght limit too. No matter how far you zoom out.

Code hilighting does not seem to be triggered on these files either.

Contributor

kevinsawicki commented Sep 16, 2012

@iwillspeak what programming language is the file that you saw the issue in? Or is it all private repository files?

Hello,
It happens for me too. Specifically, here is the case:

I went to this repo -- not private repo.

And viewed the file SpotifyControl.scpt. At first I can see only 101 lines. But, if you zoom out or zoom in (by just one tap, either way). I start seeing the remaining lines 126 in this case. Thus it seems it works if you zoom out/in at least once.

Its Samsung Galaxy S Gingerbread in my case.

For other files, like a long Python file, at first. I can see only 101 lines, but then it loads up the remaining lines of code once I hit the bottom of screen (bottom of the first 101 lines).

Thank you.
Sagar

kevinsawicki added a commit that referenced this issue Sep 16, 2012

Contributor

kevinsawicki commented Sep 16, 2012

@sagarsane Thanks, I was able to reproduce with the repo and file you mentioned.

I pushed the fix mentioned in this issue in the CodeMirror lib.

I'll cut a release early next week after some more testing.

Cool! Thanks @kevinsawicki !

The language I have noticed it in are ASM, C, Python, Markdown and Makefile. I haven't noticed it on other types of files as I don't think i've browsed any that are longer than 100 lines. It is probably all private repository files. I have also noticed it on some non-private files too. ReturnInfinity/BareMetal-OS : os/init_64.asm is an example.

On 16 Sep 2012, at 02:37, Kevin Sawicki notifications@github.com wrote:

@iwillspeak what programming language is the file that you saw the issue in? Or is it all private repository files?


Reply to this email directly or view it on GitHub.

joseds commented Sep 16, 2012

Thank you @kevinsawicki for taking care of this!

Contributor

kevinsawicki commented Sep 17, 2012

The 1.4 release with this fix is now available in Google Play.

Please let me know if you still see it or other source rendering bugs after upgrading.

Thanks again for reporting this and providing all the details.

I have updated but noticed that although there is no longer a cut off at 101 lines there now appears to be one at 202.

I just noticed one at line 600.. Java script file, shows 600 lines out of 702..

So the file loads fine in portait orientation, but in landscape I see a cutoff.
Running 4.1.2 gt-n7000 with github 1.5

Contributor

kevinsawicki commented Oct 27, 2012

@pdelanauze Is the file being cut off in a public repo that you can share a link to?

The first file is private, but found a public file that cuts off in both
portrait and orientation

https://github.com/jrburke/requirejs/blob/master/require.js

Patrick de Lanauze
patrick.delanauze@gmail.com
On 2012-10-27 12:59 PM, "Kevin Sawicki" notifications@github.com wrote:

@pdelanauze https://github.com/pdelanauze Is the file being cut off in
a public repo that you can share a link to?


Reply to this email directly or view it on GitHubhttps://github.com/github/android/issues/222#issuecomment-9837407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment