Bug 350308

Summary: Replace (CTRL+R) malfunctions with "." (dot) when AutoBrace extension is enabled.
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Zane Tu <zanetu>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Zane Tu 2015-07-17 09:58:47 UTC
Replace (CTRL+R) adds/replaces extra characters when the character to be replaced is followed by "." (i.e. dot). Options in AutoBrace, i.e. "Automatically add closing brackets" and "Automatically add closing quotation marks" must be enabled as per needed before reproducing the bug. 

Reproducible: Always

Steps to Reproduce:
Case 1: 
1. Enable "Automatically add closing quotation marks" but disable "Automatically add closing bracktes" in AutoBrace
2. New file
3. Input '.b' (i.e. a dot and the character"b", enclosed by a pair of single quotation marks)
4. Press CTRL+R (i.e. Replace)
5. Find: '
6. Replace: "
7. Mode: Plain text
8. Press "Replace All" button (or "Replace" button twice)

Case 2: 
1. Enable both "Automatically add closing quotation marks" and "Automatically add closing brackets" in AutoBrace
2. New file
3. Input [. (i.e. a left square bracket followed by a dot)
4. Press CTRL+R (i.e. Replace)
5. Find: [
6. Replace: (
7. Mode: Plain text
8. Press "Replace All" button (or "Replace" button twice)


Actual Results:  
Case 1: 
"".b""
Case 2: 
()

Expected Results:  
Case 1: 
".b"
Case 2: 
(.

Possibly related: 
https://bugs.kde.org/show_bug.cgi?id=342466
Comment 1 Christoph Cullmann 2018-08-17 20:01:50 UTC
Works with current KF5 frameworks release like intended. (but only one option is there now, enable auto brackets).