I have found that a query of 4 lines or more in the query editor will offset the character position SqlYog thinks is the active statement by 1. Consider the following example:
SELECT 'a'
;
SELECT 'b';
Placing your cursor after the “S” and before the “E” of “SELECT 'b';” and pressing F5 returns “a”
now consider this:
SELECT 'a'
;
SELECT 'b';
placing the cursor anywhere on “SELECT 'b';” and pressing F5 will wrongly return “a”