1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-22 02:51:32 +03:00
kakoune/src/line_modification.hh

28 lines
684 B
C++
Raw Normal View History

#ifndef line_change_watcher_hh_INCLUDED
#define line_change_watcher_hh_INCLUDED
#include "units.hh"
#include "utils.hh"
2015-01-12 16:58:41 +03:00
#include "vector.hh"
namespace Kakoune
{
class Buffer;
struct LineModification
{
LineCount old_line; // line position in the old buffer
LineCount new_line; // new line position
LineCount num_removed; // number of lines removed (including this one)
LineCount num_added; // number of lines added (including this one)
LineCount diff() const { return new_line - old_line + num_added - num_removed; }
};
2015-01-12 16:58:41 +03:00
Vector<LineModification> compute_line_modifications(const Buffer& buffer, size_t timestamp);
}
#endif // line_change_watcher_hh_INCLUDED