Re: quick view and user defined view
- From: Dirk Jagdmann <doj cubic org>
- To: Pavel Tsekov <ptsekov gmx net>
- Cc: mc gnome org
- Subject: Re: quick view and user defined view
- Date: Tue, 28 Jun 2005 17:38:40 +0200
Use view_file_at_line () in src/cmd.c as a starting point . The
interesting part is contained in
if (regex_command (...))
near the end of the function body. The code dealing with the quick view is
in layout.c - it shouldn't be too hard to find it :)
It shouldn't be too hard to implement this feature and indeed it makes
sense to have it.
Ok, I'm looking into this right now.
And while I compiled the fresh CVS checkout mc crashed immidiately and I
had to apply the attached patch. For some reason I dont know the "b"
parameter was always zero upon application start.
--
---> doj / cubic
----> http://cubic.org/~doj
-----> http://llg.cubic.org
Index: view.c
===================================================================
RCS file: /cvsroot/mc/mc/src/view.c,v
retrieving revision 1.279
diff -u -r1.279 view.c
--- view.c 28 Jun 2005 13:21:42 -0000 1.279
+++ view.c 28 Jun 2005 15:36:41 -0000
@@ -242,7 +244,7 @@
static inline offset_type
offset_rounddown (offset_type a, offset_type b)
{
- return a - a % b;
+ return (b==0) ? a : (a - a % b);
}
/* {{{ Simple Primitive Functions for WView }}} */
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]