From f26d3d0d6cddd0bfcdd3ed4b4bccc27e543e217a Mon Sep 17 00:00:00 2001 From: Jinhao Date: Thu, 13 Feb 2020 15:01:19 +0800 Subject: [PATCH] fix issue that wrong caret position in textbox when moving up/down --- source/gui/widgets/skeletons/text_editor.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/gui/widgets/skeletons/text_editor.cpp b/source/gui/widgets/skeletons/text_editor.cpp index 7d8c4475..d669c806 100644 --- a/source/gui/widgets/skeletons/text_editor.cpp +++ b/source/gui/widgets/skeletons/text_editor.cpp @@ -1,7 +1,7 @@ /* * A text editor implementation * Nana C++ Library(http://www.nanapro.org) -* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com) +* Copyright(C) 2003-2020 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -2482,10 +2482,8 @@ namespace nana { if (coord != coord_org) { - auto pos_x = pos.x; impl_->cview->move_origin(origin - impl_->cview->origin()); pos = _m_coordinate_to_caret(coord, false); - pos.x = pos_x; } if (pos != points_.caret) {