Description:
Pasting long queries into the query box, the end of the lines that go outside the window cannot be moved to. The cursor will not go there, or if it gets there, is not viewable. Press the End key and while the cursor goes there the window does not scroll right, so you loose the cursor.
How to repeat:
While obviously you don't have my database, I checked that the issue exists when looking at the mysql instance, too.
In a text editor (I use UltraEdit) create a query or use the two below.
Select the query and copy it.
Open the Query Browser
Paste in the selected query
Note that the query is either on one line and exceeds the length of the query window or spread over several lines but lines longer than the query window cannot be reached at the end of lines.
With the single long query,
press the End key,
Cursor exits the query window and gets lost
This is a one line query:
SELECT CS_Id, PS_Id, M_SG_Id, PS_MarketRank, PS_PerCentCoverageExpected, PS_MarketName, PS_StationCall, SG_Station, PS_Day, PS_ContractedTime, CS_CommercialCode, CS_CommercialTitle, CS_Advertiser, M_Rating, M_Impressions FROM PCSMerge left outer join ProgramSchedule ON M_PS_Id = PS_Id, CommercialSchedule, SigmaData WHERE M_PS_Id = PS_Id AND M_CS_Id = CS_Id AND M_SG_Id = SG_Id AND M_PS_Id = {0} AND M_CH_Id = {1} AND M_Run in ('1', 'S', 'L', 'C') AND PS_FirstRun = 'Y' ORDER BY PS_MarketRank, PS_StationCall, PS_ContractedTime, CS_Id
This is the same query formated over multiple lines. Lines that go outside the query window become hard to edit.
SELECT
PS_ID, CS_Id, PS_MarketRank, PS_PerCentCoverageExpected, PS_MarketName, PS_StationCall,
PS_Day, PS_ContractedTime, CS_CommercialCode, CS_Advertiser, CS_CommercialTitle
FROM
PCSMerge, ProgramSchedule, CommercialSchedule
WHERE
M_PS_Id = PS_Id AND
M_CS_Id = CS_Id AND
M_PS_Id = {0} AND
M_CH_Id = {1} AND
M_Run in ('1', 'S', 'L', 'C') AND
PS_FirstRun = 'Y'
ORDER BY
PS_MarketRank, PS_StationCall, PS_ContractedTime, CS_Id
Suggested fix: