Bug #53713 Saving a new Snippet allways saves the code from the last sql editor tab
Submitted: 17 May 2010 17:40 Modified: 28 May 2010 10:46
Reporter: Tomislav Kopajtic Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.21 OS:Linux (Ubuntu 9.10 32bit)
Assigned to: Alfredo Kojima CPU Architecture:Any
Tags: Snippet List, snippets, SQL, sql editor

[17 May 2010 17:40] Tomislav Kopajtic
Description:
Saving a new Snippet always saves the code from the last (the one most on the right) sql editor tab instead of the one being used at the moment.

How to repeat:
Open SQL Editor -> write something in the first SQL Query tab (i.e. "Select 1") -> open another tab (Ctrl+T) and write something in there (i.e. "Select 2") -> select the first tab -> go to Snippets and select "Add SQL Code in Editor to Snippet List" command -> save the Snippet under some name -> Snippet has the content of the tab which was not the current editor tab
[18 May 2010 8:07] Susanne Ebrecht
Many thanks for writing a bug report.

Verified as described.
[18 May 2010 8:08] Susanne Ebrecht
screenshot from my test

Attachment: wb.bug53713.png (image/png, text), 53.53 KiB.

[18 May 2010 20:15] Alfredo Kojima
fixed
[26 May 2010 20:32] Johannes Taxacher
fix confirmed in repository
[28 May 2010 10:46] Tony Bedford
An entry has been added to the 5.2.22 changelog:

If multiple SQL Query tabs were opened in the SQL Editor, then when a snippet was saved to the snippet list, the snippet saved would always be from the last opened SQL Query tab (the furthest to the right), rather than the currently selected tab.