mooz / js2-mode

Improved JavaScript editing mode for GNU Emacs
GNU General Public License v3.0
1.33k stars 186 forks source link

forward-sexp and backward-sexp are incoherent #574

Open DamienCassou opened 3 years ago

DamienCassou commented 3 years ago

Given this content

values
    .filter((a) => a)
    .filter((a) => a);

in a js2-mode buffer, forward-sexp seems to work fine but backward-sexp goes back to the beginning of the first line when invoked with point at the end of second line.

More information at https://github.com/AmaiKinono/puni/issues/9.

dgutov commented 3 years ago

Yes, there is certain imbalance in their working. It has been that way for basically ever, I think.

I'll look into this when I have the time. If someone would like to propose a patch, though -- welcome.