diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-04-27 20:09:09 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-27 20:09:09 +0000 |
commit | f54ea0f44d53a6b1b3c4cb2c3a3285149510cccc (patch) | |
tree | ada091a76ee0b6c24294e085b67c10ca3f8cffa7 /xfa/fwl/cfwl_edit.cpp | |
parent | 60ef3a231ba778d6a667068bdbb17f712eb335e4 (diff) | |
download | pdfium-f54ea0f44d53a6b1b3c4cb2c3a3285149510cccc.tar.xz |
Fix backspace on 1st character of a line erases the line break.
Bug: chromium:836361
Change-Id: I39a0a3f9cb59ceb81f944dd5d0d4fd38a2e18a6b
Reviewed-on: https://pdfium-review.googlesource.com/31411
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_edit.cpp')
-rw-r--r-- | xfa/fwl/cfwl_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index afa9aac87d..8ebc155a80 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -1252,7 +1252,7 @@ void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) { switch (c) { case L'\b': if (m_CursorPosition > 0) { - SetCursorPosition(m_EdtEngine.GetIndexBefore(m_CursorPosition)); + SetCursorPosition(m_CursorPosition - 1); m_EdtEngine.Delete(m_CursorPosition, 1); } break; |