undo

Force IE contentEditable element to create line breaks on Enter key, without breaking Undo

On Internet Explorer, a contentEditable DIV creates a new paragraph (<p></p>) each time you press Enter whereas Firefox creates a <br/> tag. As discussed here, it is possible to use JavaScript to intercept the Enter keyPress and use range.pasteHTML to create a <br/> instead. But doing this breaks the Undo menu; once you hit Enter, you...

How can I undo all changes to a block of text in vim?

Is it possible to select some text with visual line and undo all changes made to it from the beginning ? ...

NSUndoManager undo Not Working With Core Data

Hi there, I am trying to create an iPhone application where the user can add entries. When he presses a new entry, a box will popup asking him for some information. Then he can either press "Cancel" or "Save" to discard the data or save it to disk. For saving, I am using the Core Data framework, which works pretty well. However, I cann...

Why doesn't visual studio do anything when I press CTRL-Z the first time?

Maybe it's only this way in my instance, but maybe not. When I'm editing an ASPX file in Visual Studio 2008 and I press CTRL-Z to undo, nothing happens. Then I press CTRL-Z a second time and it does what it's supposed to do. There is a flicker the first time I undo, so maybe something IS happening. Maybe it's by design and I should be h...

git: undo a merge?

Within my master branch, I did a git merge some-other-branch locally, but never pushed the changes to origin master. I didn't mean to merge, so I'd like to undo it. When doing a git status after my merge, I was getting this message: # On branch master # Your branch is ahead of 'origin/master' by 4 commits. Based upon the instructions ...

Object Serialization for Undo/Redo Functionality Java

I have been trying to implement and undo/redo system in a game I am coding in Java. I am taking the approach of serializing the state of the game after each move. I there a way of saving the serialized objects on a stack and accessing them for undo/redo? ...

Preventing a RichTextBox operation from being added to the control's Undo stack

Editing a RichTextBox control's text (more specifically, modifying selection font/color) programmatically seems to be tracked in the control's built in undo stack. Is there a way, short of writing my own undo/redo "manager", to prevent certain actions/operations from being added to the undo stack ? ...

Replacing objects, handling clones, dealing with write logs

Hi everyone, I'm dealing with a problem I can't figure out how to solve, and I'd love to hear some suggestions. [NOTE: I realise I'm asking several questions; however, answers need to take into account all of the issues, so I cannot split this into several questions] Here's the deal: I'm implementing a system that underlies user applica...

Best practices for managing updating a database with a complex set of changes

I am writing an application where I have some publicly available information in a database which I want the users to be able to edit. The information is not textual like a wiki but is similar in concept because the edits bring the public information increasingly closer to the truth. The changes will affect multiple tables and the update ...

Jquery javascript - How can I let users 'undo' their modifications?

Hi, i have a basic jquery app that allows a user to edit and manipulate some lists on a page. What I would like to do is have a button 'restore original list' that the user can press to undo his modifications. What is the best way to do this? I was thinking of just copying the DOM from the list down, and pasting it in a hidden element s...

OpenGL ES Simple Undo Last Drawing

Hi Everyone, I am trying to figure out how to implement a simple "undo" of last drawing action on the iPhone screen. I draw by first preparing the frame buffer: [EAGLContext setCurrentContext:context]; glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); I then prepare the vertex array and draw this way: glVertexPointer(2, GL...

How do I create "undo" in c++?

I've got a couple of codes to do some things but I need to create a function that undoes the previous task/addition/change.How do I do this in Borland C++? (the program stores strings of text in a text file using "list",it is stored and then erased unless I use the save-function I've created) right,so I don't know if I've forgotten to ...

Javascript UndoManager Browser Support

The HTML5 spec mentions an UndoManager that can be used to query the previous state of a document that's been edited by a user ( http://www.whatwg.org/specs/web-apps/current-work/#undomanager ). Do any browsers support this? Is there any hope of browsers ever supporting it? ...

How do I get fine-grained undo in Vim

I find Vim's undo to be a bit too coarse. E.g. if I type something like this: a // to go into edit mode to be or not to ve <esc> // to exit insert mode Oops! I made a typo. I want to start undoing so I press u, but then it clears the whole line. Is there a way to undo word-by-word or character-by-character? ...

How do I control when the Undo button is clickable in a Rich Text Editor using YUI?

Right now I have a page with 2 tabs. When the EDIT tab is clicked a YUI rich text editor will load up and create the toolbar and textarea to edit. I then will do a RESTful GET call to retrieve the data and then set it to the textarea value. This causes the Undo button to be clickable since the value was originally empty and then text was...

NSUndoManager won't undo editing of a NSMutableDictionary

Hi, I'm experiencing problems with the undo operation. The following code won't undo an removeObjectForKey: operation but the redo operation setObject:ForKey: works. - (void) insertIntoDictionary:(NSBezierPath *)thePath { [[[window undoManager] prepareWithInvocationTarget:self] removeFromDictionary:thePath]; if(![[window undoManage...

Autotools: how to cleanup files created by "./configure" in lighttpd project?

Hi all, I'm starting to try out lighttpd for an embedded linux project. I got the curret source package and and started writing a master makefile ecapsulating all configer, compile, install (for testing) etc stuff. And vice-versa I want to cleanup every step. This cleanup should be 100%, i.e. there should be no generated files anymore a...

"Undoing deletes" in webapplication?

Hi everybody, I have seen more and more of the websites that offers a undo option after pressing a delete button. How is the logic done behind the button? Is the item deleted by javascript and "dissapears" from the users screen and a scheduled delete added, that gives the user time to undo it or how does it work? What are the other op...

How can I access the QUndoStack of a QTextDocument?

How can I access the QUndoStack of a QTextDocument? (For example, I want to be able to add custom QUndoCommand objects to the document's undo stack) ...

WPF MVVM UpdateSourceTrigger=Excplict

Hello, i've a contentcontrol in my Wpf-App (MVVM) which is bound to an object and displays the objects properties in textboxes, so the user can edit the values of the properties. I want to implement undo/redo functionality with the command pattern of the GoF. For this i need a point where i can create the command and set it into my undo...