• Mehdi Sadeghi's avatar
    Force visual word movements for RTL · 494c76dd
    Mehdi Sadeghi authored
    Upon pressing Ctrl-arrow keys, swap direction if
    the pango direction of the current line is RTL.
    Problem description by Daniel Boles:
      Using Ctrl + Left or Right to jump by words was not accounting for the
      possibility that the text was right-to-left. So, the observed direction
      of movement was opposite to the direction of the arrow key pressed. This
      was unintuitive and inconvenient for users editing RTL text.
      This patch gets the Pango direction of the text in the current line when
      Ctrl + an arrow key is pressed, and inverts the direction of movement if
      it is RTL, thus ensuring that the pressed and observed direction match.
gtksourceview.c 126 KB