# Editor wonkiness when completing Variable substitons

**URL:** https://www.finalbuilder.com/forums/t/editor-wonkiness-when-completing-variable-substitons/3198
**Category:** Bugs
**Created:** [December 9, 2009, 10:06am UTC](https://www.finalbuilder.com/forums/t/editor-wonkiness-when-completing-variable-substitons/3198 "2009-12-09T10:06:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [December 9, 2009, 10:06am UTC](https://www.finalbuilder.com/forums/t/editor-wonkiness-when-completing-variable-substitons/3198/1 "2009-12-09T10:06:24Z")

</div>

This is rather tricky to reproduce, but basically when completing Variables using the enter key where another variable follows the text being modified on another line, the text between the variables is deleted.&nbsp; (I've also seen an instance where text gets replicated, but that's less of an issue.)

To reproduce using FinalBuilder 6.3.0.1847 on Windows XP&nbsp;64-bit:

1. create an empty project.
2. add a project variable, say named "Test"
3. ( this occurs in any edit box )&nbsp;create a "Set Variable"&nbsp;Action.
4. Choose "New Value"&nbsp;for "New Value".
5. Enter the text ( including newline ):&nbsp;"%Test%  
 A&nbsp;%Test%"
6. On the first line, delete "st%".
7. When the Variable completion appears, select "Test".
8. The newline and "A" disappear, leaving:&nbsp;"%Test%&nbsp;%Test%".

This is mostly an annoyance.&nbsp; I&nbsp;really appreciate the variable name completion feature.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 10, 2009, 10:17am UTC](https://www.finalbuilder.com/forums/t/editor-wonkiness-when-completing-variable-substitons/3198/2 "2009-12-10T10:17:12Z")

</div>

Hi John   
  
 Thanks for the report. I can reproduce the bug here. I will have a look and see if it’s simple to fix, if not then it might have to wait for FB7, as we are hoping to have time to completely redo the variable completion code… it’s a little too fragile at the moment (it’s had too many band aid type fixes) and really needs a new parser.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 11, 2009, 1:43am UTC](https://www.finalbuilder.com/forums/t/editor-wonkiness-when-completing-variable-substitons/3198/3 "2009-12-11T01:43:28Z")

</div>

Ok, the fix turned out to be simple… new build :   
  
 [https://www.finalbuilder.com/downloads/finalbuilder/630/FB630\_1850.exe](https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1850.exe)

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [December 11, 2009, 9:07am UTC](https://www.finalbuilder.com/forums/t/editor-wonkiness-when-completing-variable-substitons/3198/4 "2009-12-11T09:07:13Z")

</div>

Thank you!   
 That seems to work great.   
  
 And my XML and SQL statements thank you!
