bugfix: Adjust caret for textbox in line-wrapped mode.
bugfix: Some compiling issue for GCC.