Replication of bug #4292 in inline sql edit

Signed-off-by: A V Minhaz <minhazav@gmail.com>