Red Gate forums :: View topic - SQL Prompt Breaks Block Indenting / Keep Tabs
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5
SQL Prompt 5 forum

SQL Prompt Breaks Block Indenting / Keep Tabs

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
njahncke



Joined: 16 Jun 2009
Posts: 16

PostPosted: Wed Aug 21, 2013 9:37 pm    Post subject: SQL Prompt Breaks Block Indenting / Keep Tabs Reply with quote

Hey there everyone,

I uncovered this problem originally using the latest version of SQL Prompt 5, but I'm using 6 right now and it is unchanged.

Windows 7 SP1

Management Studio (MS): 11.0.2100.60
MS is configured for Block Indenting (as you may have inferred) with its Tab and Indent sizes set to 4. MS is also configured to keep tabs.

SQL Prompt: 6.0.0.402
SQL Prompt's "Tabs & Wrapping" behavior is set to only use tabs, which are also set to 4 spaces.


The problem itself is best demonstrated by example...

Configure your system as described above and then enter the following code, using whatever table you have handy:

Code:

SELECT
   *
FROM
   [dsr].[Audit] AS A
WHERE
   [A].[Activity] = 'Update'

With your cursor at the end of 'Update' on Line 6, press <Enter>. If your system is properly configured for this experiment, your cursor should now be sitting on the next line (7), indented one tab. Verify that Block Indenting is currently working by pressing your left arrow key. The cursor will skip left one full tab. This is the desired behavior.

Press the backspace key to return your cursor to the end of Line 6, and then press <Enter> once more. Your cursor will again be on Line 7, indented one tab.

Type AND. If your suggestion window displays, press <Enter> to insert AND into your code. If not, do not press <Enter>. Your code should now look like this (with your cursor at the end of the AND on Line 7):

Code:

SELECT
   *
FROM
   [dbo].[Audit] AS A
WHERE
   [A].[Action] = 'Update'
   AND

Press <Enter>. If you are suffering from the same problem as myself, you will see your cursor drop to Line 8, but it will not be indented as it should be. If you then press your right arrow key, you will see that SQL Prompt has inserted four spaces instead of a tab, completely breaking the expected Block Indenting / Keep Tabs behavior.

Note that disabling SQL Prompt code suggestions fixes this issue.


Is anyone familiar with this issue? I took pains to try and find reference to something similar in the forum, but was unable.

This is a truly frustrating issue, as it requires numerous superfluous key presses with almost every new line of code.

Thank you in advance for any help you can provide.

(I freakin love Tab History btw; thanks for adding it!)
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 211
Location: Red Gate Software

PostPosted: Thu Aug 22, 2013 10:00 am    Post subject: Reply with quote

Thanks for the detailed reproduction steps! I can recreate this on my machine and will look into a fix.

I'm glad to hear you're enjoying the tab history Smile
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 211
Location: Red Gate Software

PostPosted: Thu Aug 22, 2013 3:19 pm    Post subject: Reply with quote

This should now be fixed in 6.0.0.412.
Back to top
View user's profile Send private message
njahncke



Joined: 16 Jun 2009
Posts: 16

PostPosted: Thu Aug 22, 2013 11:47 pm    Post subject: Reply with quote

Fantastic; thanks a lot, Aaron. Do you know when the next EAP release is scheduled for?
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 211
Location: Red Gate Software

PostPosted: Fri Aug 23, 2013 11:18 am    Post subject: Reply with quote

This should build be up already, you can get it from the check for updates within prompt or download from http://download.red-gate.com/EAP/SQLPrompt/SQLPrompt.zip
Back to top
View user's profile Send private message
njahncke



Joined: 16 Jun 2009
Posts: 16

PostPosted: Sun Aug 25, 2013 12:07 am    Post subject: Reply with quote

Awesome; works like a charm. Thanks a lot for the quick turn-around on this. I'll be sure to keep my eyes open for any other weirdness.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group