)]}'
{
  "commit": "6760f172b5843f8e374a5bcc84faa865e704abb0",
  "tree": "87cd0f5e5820e660697c86dde5bf88ba1fc62544",
  "parents": [
    "634941c8972645156afd0451866608da4127d392"
  ],
  "author": {
    "name": "April Kallmeyer",
    "email": "ask@chromium.org",
    "time": "Thu Sep 18 09:52:40 2025 -0700"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Sep 18 09:52:40 2025 -0700"
  },
  "message": "Fix selecting replaced text after undo\n\nPDFium uses a stack of undo items to implement undo/redo. For text\nreplacement there are a variable number of undo items added to stack.\nThe UndoReplaceSelection undo item class was created in\nhttps://pdfium.googlesource.com/pdfium/+/3abc96a18bf41a55958e2fe99a3ce03882c3ecb5\n\nI believe the SelectNone calls that caused this bug were simply a\ncopy-paste error since many of the other undo items call that.\nUndoReplaceSelection is only a sentinel item that tracks the number of\nintermediate undo items, it shouldn\u0027t do any actions itself.\n\nFor ReplaceAndKeepSelection arguably when the redo action runs the\nreplaced text should be selected as it was originally, but in this\nchange it is left unselected like after redoing ReplaceSelection. I\nthink this makes sense because in general selection is not an undo item,\npasting over a selection is a special case that is widely implemented.\nIf you select text, then press undo then redo, the text will not be\nselected anymore. There is no equivalent operation of \"paste and then\nselect the pasted text\" in other programs, so nothing to defer to. Also\nthis is an experimental API for pdfium. So overall I think it makes\nsense to leave as-is instead of adding a new undo item type for this\nselection.\n\nFixed: 445215584\nChange-Id: Ife7f13aca9dbe2260f2f4a1b2ef5650099f44dd5\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/135750\nCommit-Queue: April Kallmeyer \u003cask@chromium.org\u003e\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\nReviewed-by: Lei Zhang \u003cthestig@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6268d8a566a5b9cd40de1793d42bba0ce36efc29",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_formfill_embeddertest.cpp",
      "new_id": "6f33fa583cca6a68f425aa15ed5edf7d80da33b8",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_formfill_embeddertest.cpp"
    },
    {
      "type": "modify",
      "old_id": "1a56f9eb8e520252621c3ce8ac98d42bbcc07193",
      "old_mode": 33188,
      "old_path": "fpdfsdk/pwl/cpwl_edit_impl.cpp",
      "new_id": "a025ebaeb641dee99be16e53a4e2037bf1aeeb3e",
      "new_mode": 33188,
      "new_path": "fpdfsdk/pwl/cpwl_edit_impl.cpp"
    }
  ]
}
