Unsupported Screen Size: The viewport size is too small for the theme to render properly.

F12 ("format Current Query") Removes All Blank Lines

forums forums SQLyog SQLyog: Bugs / Feature Requests F12 ("format Current Query") Removes All Blank Lines

  • This topic is empty.
Viewing 0 reply threads
  • Author
    Posts
    • #11698
      vygi
      Member

      maybe it's already known problem, or maybe it's a feature:

      F12 (“format current query”) not only format the current query; it also removes all blank lines between other queries and moves trailing comments to the next line.

      BEFORE (with cursor in the last line):

      Code:
      # 1st query:
      SELECT * FROM table1;

      # 2nd query:
      SELECT * FROM table2;

      SELECT * FROM table3; # this was the 3rd query

      SELECT * FROM table4; # this was the 4th query

      # the last one (5th) to be formatted:
      SELECT * FROM table5;

      AFTER F12:

      Code:
      # 1st query:
      SELECT * FROM table1;
      # 2nd query:
      SELECT * FROM table2;
      SELECT * FROM table3;
      # this was the 3rd query

      SELECT * FROM table4;
      # this was the 4th query
      # the last one (5th) to be formatted:
      SELECT *
      FROM table5;

      I thing it is at least “srange” that SQLyog somehow formats all other queries (removes blank lines and re-arranges comments) after pressing “F12” which should only format the current query.

Viewing 0 reply threads
  • You must be logged in to reply to this topic.