Fix selecting --- when editing query