Skip to content

Dragging a small document tab next to a bigger one causes flicker #2771

@that-ben

Description

@that-ben

Description of the Issue

Whenever you have multiple documents open and want to re-order the tabs by dragging a small one ("tiny.c") next to a bigger one ("humongous.txt") the tabs row is flickering super fast and makes it random to 50% chances of obtaining the desired result.

Steps to Reproduce the Issue

  1. Open at least 2 documents, one with a small file name and one with a big file name.
  2. Try to swap the 2 tabs (re-order them) by dragging the small one to the other side of the bigger one .
  3. ????
  4. Profit!!!

Expected Behavior

The tabs row should not flicker, as it makes it super awkward to re-order tabs and you must sometimes try a second or a third attempt to obtain the desired result.

Actual Behavior

The tabs flicker by alterning themselves super quickly. The slower the mouse movement, the more flicker.

Debug Information

NotePad++ v6.9.2

This is due to the algorithm when you drag and drop the tabs shifting them based on an illogic comparative. What NotePad++ should be doing is to shift the tab only when it has been dragged more than 50% the width of the next tab, not when it is dragged the first pixel outside of its own boundaries. Basically, the problem is that the 2 pieces of code that 1) drag the tab and 2) check if the tab should be shifted, are not equivalent, causing a super fast flicker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions