<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:drousso&#64;apple.com" title="drousso&#64;apple.com">drousso&#64;apple.com</a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected"
   href="https://bugs.webkit.org/show_bug.cgi?id=147316">bug 147316</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #257895 Flags</td>
           <td>
               &nbsp;
           </td>
           <td>review?, commit-queue?
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected"
   href="https://bugs.webkit.org/show_bug.cgi?id=147316#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Autocomplete: Undo (Cmd+Z) doesn't work as expected"
   href="https://bugs.webkit.org/show_bug.cgi?id=147316">bug 147316</a>
              from <span class="vcard"><a class="email" href="mailto:drousso&#64;apple.com" title="drousso&#64;apple.com">drousso&#64;apple.com</a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=257895&amp;action=diff" name="attach_257895" title="[Proposed] Patch">attachment 257895</a> <a href="attachment.cgi?id=257895&amp;action=edit" title="[Proposed] Patch">[details]</a></span>
[Proposed] Patch

The reason for this is because the &quot;replaceRange&quot; call in &quot;WebInspector.CodeMirrorCompletionController._applyCompletionHint&quot; causes CodeMirror to add another history state, and that addition messes up the previous history states (each time the user changes the text, replaceRange is called, therefore interrupting the collating of history events).  Using &quot;setUniqueBookmark&quot; allows us to keep the history state accurate while also displaying the current completion.  There are some small setbacks (it does not have all of the styling as before), but the benefits of being able to undo nicely outweigh those drawbacks (in my opinion at least).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>