[FIX] XQuery: only set result limit if it is not unlimited
[MOD] GUI, Ctrl-H/Ctrl-J: more context-sensitive behavior