Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Much blinking near the end of file #680

Closed
DatName opened this issue Feb 27, 2016 · 10 comments
Closed

Much blinking near the end of file #680

DatName opened this issue Feb 27, 2016 · 10 comments

Comments

@DatName
Copy link

DatName commented Feb 27, 2016

When typing near the end of file (for example, line 85 out of total 90) dropdown menu blinks, trying to figure out best position for itself: either above or below selected line. After some time (about second or less) it stops doing that, but if I type, for example, "for" and move cursor away from the atom application window it keeps blinking until I move cursor back.

@jasongilman
Copy link

I've seen this a lot in my own development and with other people I'm working with. We're mostly doing completion in Clojure files with documentation included in the window. The problem is exactly as described. It tries to position it below the cursor, then switches above and then back below. It will flash between those two states. I can't reproduce it consistently so it seems to rely on having the right set of circumstances.

Autocomplete plus is just using an overlay so it's more likely a bug in the Atom overlay layout code.
I have a hunch problem might be somewhere in text-editor-presenter.coffee updateOverlaysState.

@jordwalke
Copy link

Any word on the general flakiness/jumpiness of autocomplete-plus? It makes Atom feel kind of cheap, so I think making autocomplete-plus solid and reliable is high impact for Atom.

@p2kmgcl
Copy link

p2kmgcl commented May 11, 2016

Until a real fix comes, if have created this stylesheet quick fix which works really well:

atom-overlay.autocomplete-plus {
  // Although this creates a nice animation, it makes the popup
  // come from the bottom of the file everytime it appears, so
  // I would keep it disabled.
  // transition: top ease 0.3s, left ease 0.3s;
}

autocomplete-suggestion-list.select-list.popover-list {
  // This animation is toggled everytime the left column
  // which specifies if the completion is a variable, function,
  // or anything else appears/dissappears.
  transition: margin-left ease 0.3s;

  // Giving a fixed with to the completion popup
  // prevents from flickering during different suggestions
  min-width: 400px;
  max-width: 400px;

  // Giving a fixed height to the popup prevents from
  // moving up and down when we are typing at the
  // bottom of the file. For some reason it won't grow
  // more than 350px in my editor, so consider this the
  // maximum value.
  min-height: 350px;
  max-height: 350px;

  // This position pulls down the description completion
  // (for example for css properties).
  & > .suggestion-description {
    position: absolute;
    bottom: 0;
    width: 100%;
  }
}

I know it is just a silly patch, but it works perfectly in my editor 🐱

@mauricioszabo
Copy link

Maybe an image will show how HORRIBLE is this bug...

In fact, the GIF framerate is slow. The flicker is MUCH MORE terrible. Please notice that I'm only typing on the editor, not moving mouse aroud or anything...

@habemus-papadum
Copy link

@mauricioszabo a perfect capture of what I was seeing -- thanks for taking it

@Ben3eeE
Copy link

Ben3eeE commented Oct 14, 2016

Closing as a duplicate of atom/atom#8295 which was closed via atom/atom#12977

@Balinus
Copy link

Balinus commented Nov 15, 2016

@p2kmgcl : where do I put this code? Thanks!

It's so annoying!

edit - Sorry, just seemed to found it : "style.less" under "~/.atom" directory (Linux).

Thanks again for the code. It works for me!

@Ben3eeE
Copy link

Ben3eeE commented Nov 15, 2016

@Balinus This should be fixed in the latest version of Atom, make sure you update. The workaround should not be needed any more.

@Balinus
Copy link

Balinus commented Nov 15, 2016

@Ben3eeE : indeed, but I'm working on an enterprise server and updates are much less frequent than on my desktop. Hence, this fix might come on our server in a couple of weeks or months :)

@Ben3eeE
Copy link

Ben3eeE commented Nov 15, 2016

@Balinus For the workaround you are supposed to put it in your stylesheet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants