Osmose / advanced-open-file

Open files and folders in Atom easily.
https://atom.io/packages/advanced-open-file
Other
118 stars 20 forks source link

long dir trees run off the input box. #22

Closed ChadMartinson closed 9 years ago

ChadMartinson commented 9 years ago

It would be nice to see what is being typed when the string is longer than the input box.

Osmose commented 9 years ago

Thanks for the report!

I'm unsure of exactly what you mean. When there's a really long path in the input, it should show what you're typing as you start typing it. There was also #7, where we scroll to the end of the input on toggle. Is your textbox not scrolling to the end when you type?

ChadMartinson commented 9 years ago

Yes exact same issue. Sorry I should have read through them better. It is not working for me. After messing with it I have found that I need to scroll down to see my cursor on a long path.

ChadMartinson commented 9 years ago

scrolling on overflow-x seems more natural.

Osmose commented 9 years ago

Oh, do you mean this?

screen shot 2015-09-03 at 12 36 40 pm

And if I hit down a few times the highlighted item moves out of view and you have to scroll, right?

I think I understand now, and you're right, the list should scroll if you move down past the bottom edge.

ChadMartinson commented 9 years ago

I don't know about that. I'm talking about this.

screen shot 2015-09-03 at 4 04 24 pm
ChadMartinson commented 9 years ago

I have to scroll down in the input to read what I'm typing.

Osmose commented 9 years ago

I think I'm reading you too literally, because the "down" part is what was confusing me. The text doesn't flow to another line, it just extends right past the end of the input, right? Then you'd be scrolling to the right, not down, in my mind. Sorry about that.

So for you the text input isn't scrolled to the end when it's opened with a long path? What OS are you using? Is the cursor located at the end even if the input isn't visually scrolled to the end?

ChadMartinson commented 9 years ago

Ok the cursor is located at the end and and no the text input is not scrolled to the end when it't opened with a long path or when I type and the path exceeds the size of the the text input. If I scroll down while the cursor is in the text input I can see it. I am on a mac with yosemite.

ChadMartinson commented 9 years ago

In your mind should be right, but it's not. When I get to the end of the text input a new line is started out of view. So I have to scroll down and not to the right to see my text.

Osmose commented 9 years ago

Huh, that is really weird! I'm unable to replicate the issue. Maybe it has something to do with your theme? What theme are you using?

ChadMartinson commented 9 years ago

It does seem to be a theme related issue. Works with Atom Material, One Light and One Dark. Doesn't work with Yosemate, PreDawn, Atom Light or Atom Dark.

On the themes that it is working with the text input expands when it wraps. On the ones where it doesn't work the text input isn't expanding and the line is wrapping.

I really like advanced open file and will switch to One Dark so that I can continue on using it. Thanks for all your hard work.

Osmose commented 9 years ago

I really like advanced open file and will switch to One Dark so that I can continue on using it. Thanks for all your hard work.

Wow, that's awesome. Thanks!

I'm still going to attempt to fix this though. :P

Osmose commented 9 years ago

Huh, really weird. I still can't replicate the issue.

If you are okay with using a different theme, maybe we should just close this and reopen if anyone else reports a similar problem? Or if you submit a fix that works for you I'm happy to merge if it doesn't affect normal behavior otherwise.

cjbottaro commented 9 years ago

I have the same issue. Using Atom Dark theme and Dracula syntax theme (if that matters).

Osmose commented 9 years ago

/me shakes his fists at the gods

I'll take another stab at replicating this later this week, and if I can't, I'll try putting up a commit with some blind fixes so you can test to see if it fixes things.

olmokramer commented 9 years ago

I also have to scroll down to see the text on atom-dark v0.51.0 and dark-flat-ui v1.2.2, but in one-dark v1.0.3 this is happening (!)

2015-09-08-200814_3200x1200_scrot

Osmose commented 9 years ago

IT'S SO PURPLE

olmokramer commented 9 years ago

:p Yeah I use skeletor-syntax and apparently one-dark derives its colors from the syntax theme...

Osmose commented 9 years ago

I also have to scroll down to see the text on atom-dark v0.51.0 and dark-flat-ui v1.2.2, but in one-dark v1.0.3 this is happening (!)

AHA! It's because we're using an <atom-text-editor> tag! It allows your keyboard shortcuts and other fancy things to work fine, but it also means settings like soft-word-wrapping apply! Though I'm still trying to figure out what causes the scrolling behavior. Scratch that, the scrolling effect happens when soft-word-wrap is applied on certain themes, like atom-dark. Other themes, like one-dark, just expand the box.

...which actually brings up a good question. Should we override the user's preferences and force it to be a single line? I'm not a huge fan of duplicating the bajillion possible options that could apply, but I also don't want to block a preference that the user has set. Maybe that won't matter, though? Hmmmm.

Osmose commented 9 years ago

Nah, I'll just see if I can disable soft-word-wrap on the input.

Osmose commented 9 years ago

@olmokramer I've got a branch up at https://github.com/Osmose/advanced-open-file/tree/fix-scrolling-issue that fixes the issue for me, can you verify that it fixes things for you? If so, I'll merge and release shortly.

olmokramer commented 9 years ago

I'll check it out!

olmokramer commented 9 years ago

Yeah, everything seems to be working fine! Thanks for the quick fix!

Osmose commented 9 years ago

No problem, thanks for verifying!

This is merged and will be released within the next few days.