Edit

IABSD.fr/src/usr.bin/make

Branch :

  • Show log

    Commit

  • Author : tb
    Date : 2020-08-30 12:16:04
    Hash : e33a93b3
    Message : Fix :S with anchors and replacement gnezdo noticed that :S/old_string/new_string/ variable modifiers such as :S/^sth/&/ and :S/sth$/&/ with an anchor in the old_string and an & in the new_string don't work as documented (and expected) since they replace & with old_string including the anchors. This is because get_spatternarg() deals with skipping the anchors in pattern->lhs only after having replaced any '&' in the buffer that will eventually become new_string with pattern->lhs. Fix this by moving the logic of skipping the anchors from get_spatternarg() into common_get_patternarg() so it is done before & is handled. ok millert