From: Aleksander Ɓukasz Date: Mon, 15 Jul 2013 11:10:20 +0000 (+0200) Subject: Fixing regression X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/13d12f40384027bfbaf7b763fdc64e6a0f9da73d Fixing regression Should move to the next fragment on a single replace. --- diff --git a/redakcja/static/js/wiki/view_search.js b/redakcja/static/js/wiki/view_search.js index e41f19d6..ae0fd2db 100644 --- a/redakcja/static/js/wiki/view_search.js +++ b/redakcja/static/js/wiki/view_search.js @@ -90,9 +90,12 @@ else {} self.searchCursor.select(); self.searchCursor.replace(query); + var found = self.search(); if(self.options['replace-all']) { - while(self.search()) + while(found) { self.replace(); + found = self.search(); + } } };