diff options
author | fluxgen <fluxgen> | 2003-12-16 17:06:52 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-16 17:06:52 (GMT) |
commit | 72b878f78c0df0a54cf8e9f04bb2e22dd6715658 (patch) | |
tree | 2bd5252fe426875a8bb7ba77b61eeff695ee3c62 /src/FbTk/TextBox.cc | |
parent | a1930dbf6ae447e92a8dc063ab5d36057ae1babc (diff) | |
download | fluxbox_paul-72b878f78c0df0a54cf8e9f04bb2e22dd6715658.zip fluxbox_paul-72b878f78c0df0a54cf8e9f04bb2e22dd6715658.tar.bz2 |
fixed some icc warnings
Diffstat (limited to 'src/FbTk/TextBox.cc')
-rw-r--r-- | src/FbTk/TextBox.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc index 519b56e..1eec4eb 100644 --- a/src/FbTk/TextBox.cc +++ b/src/FbTk/TextBox.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: TextBox.cc,v 1.3 2003/10/05 07:20:47 rathnor Exp $ | 22 | // $Id: TextBox.cc,v 1.4 2003/12/16 17:06:52 fluxgen Exp $ |
23 | 23 | ||
24 | #include "TextBox.hh" | 24 | #include "TextBox.hh" |
25 | #include "Font.hh" | 25 | #include "Font.hh" |
@@ -254,11 +254,9 @@ void TextBox::keyPressEvent(XKeyEvent &event) { | |||
254 | } | 254 | } |
255 | 255 | ||
256 | void TextBox::setCursorPosition(int pos) { | 256 | void TextBox::setCursorPosition(int pos) { |
257 | m_cursor_pos = pos; | 257 | m_cursor_pos = pos < 0 ? 0 : pos; |
258 | if (m_cursor_pos > text().size()) | 258 | if (m_cursor_pos > text().size()) |
259 | cursorEnd(); | 259 | cursorEnd(); |
260 | else if (m_cursor_pos < 0) | ||
261 | cursorHome(); | ||
262 | } | 260 | } |
263 | 261 | ||
264 | void TextBox::adjustEndPos() { | 262 | void TextBox::adjustEndPos() { |