Changeset 1451


Ignore:
Timestamp:
11/05/19 08:56:23 (12 days ago)
Author:
gogo
Message:

When highlighting smoe text and hitting "." SmartReplace? was causing the text not to be replaced by a "." this fixes that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/SmartReplace/SmartReplace.js

    r1374 r1451  
    187187{ 
    188188        var editor = this.editor; 
     189  var saveSel = this.editor.saveSelection(); 
    189190        var sel = this.editor.getSelection(); 
    190191        var r = this.editor.createRange(sel); 
     
    203204                        } 
    204205                } 
     206                else 
     207    { 
     208      editor.restoreSelection(saveSel); 
     209    } 
    205210        } 
    206211        else 
     
    218223                                return false 
    219224                  } 
    220                 } 
    221                 editor.getSelection().collapseToEnd(); 
     225                  editor.getSelection().collapseToEnd(); 
     226                } 
     227                else 
     228    { 
     229      editor.restoreSelection(saveSel); 
     230    } 
    222231        } 
    223232        return true; 
Note: See TracChangeset for help on using the changeset viewer.