texlipse icon indicating copy to clipboard operation
texlipse copied to clipboard

Enhancing and fixing the wrap toggle button

Open montex opened this issue 4 years ago • 0 comments

This pull request is about the button in the editor that allows switching word wrap between on and off.

Rationale:

  • The current implementation of the wrap toggle button is buggy (Issue #53)
  • The button only allows enabling or disabling word wrap, while wrap mode (hard or soft) can only be decided in the preferences
  • The choice in the preferences and the state of the button are not consistent
  • It is useful to quickly switch between hard and soft wrap, especially when working with collaborators. Some editors (notably, Overleaf) use soft wrap, while other use hard wrap, so it is necessary sometimes to adjust to what your collaborators are using.

This pull request adds the following functionality:

  • The wrap button is now a three-states button. Clicking it cycles between the states disabled / soft wrap / hard wrap.
  • The states are distinguished by icons of different colors
  • Button state is synchronized with the property page (and vice-versa)

I have used it for a while and it seems to work correctly, but it would be nice if someone else could try it out.

Note: This pull request includes the changes in #98, so in case this is merged #98 can be closed.

montex avatar Feb 04 '21 17:02 montex